Well here are a few suggestions of what you can do to verify the integrity of your backup.
For a backup-script it's essential to have working error checking for everything.
For instance;
* what happens when tar fails for some reason?
* how will you handle an interrupted backup?
* what if the mail doesn't get sent or doesn't reach you? (when you implement this feature)
I would advise you to use a logfile and a lockfile. The logfile logs everything your script succeeds or fails to do, as well as what files are being backed up.
This will serve you well when backups don't work or when you need a particular file from your backup and you only have to grep your logfiles to see where the file is located.
The lockfile makes sure that no more than one instance is running of the backup-script at any time. This script should delete the lockfile as the very last thing. This let's you implement a feature which looks for the lockfile at the beginning of the script, and if it's found, you know the previous backup failed or is still running.
It's also a good thing to check the integrity of the backup once it's done.
Checking the archive with tar -t and watching exit statis could probably suffice.
cheers
|