Well I managed to get the file created, I had to use visudo to create a custom file with my edits.
I'm testing it now to see if everything works.
Really? It doesn't let you just sudo a file in the dump directory? I wonder how they are enforcing that?
Yeah, not sure why it was having a hissy fit over it, but I've got a good working custom sudoer.d/god file now that can be used for what I have, and I can simply cp that into the appropriate folder and reset the perms on it (if required) to get everything working.
Is there a reason that you are looking into Awk? Awk is a programming language that used to be popular for extension text processing in conjunction with BASH. But in the last decades, its use has fallen away and that is why you won't find examples of it. It's only used for very basic things now. Languages like Perl and Python supplanted it being easier to use, better known, more portable, and vastly more powerful. Awk is really a legacy tool today.
Is it safe to assume that the gzip file is correct when it is created?
This is what I'm looking to verify :)
I'm assuming that files are static during backup.
If you first of all run md5deep on all files in the folder, you'll create a textfile that contains md5 (or sha256 or what you want) signatures on every file in the folder. Place it into the folder so it ends up inside the backup and you'll always have the ability to verify any uncompressed individual file.
If you really want to verify your tar.gz file after it's created I think you have to decompress the files to a temporary folder, run md5deep on the files to compare them with the original file. What you really are testing is that the backup-compress-decompress-restore operation is lossless on every file. It should be by design, but if there is an unlikely bug somewhere it's technically possible that it might not be.
If you use the gzip compression with tar, gzip has a CRC-32 checksum inside that can be used to verify the integrity of the gzip file.
Or to be even more certain you can create an md5 signature of the entire gzip archive with md5sum or md5deep. Then you can always verify that the archive has not been corrupted.
If you ever need to restore the files you can verify the integrity of the restored files with the md5 you created on the original files, before you did the backup.