On Dec 5, 2012, at 3:53 PM, Chris Lee <[email protected]> wrote:
> Hi All, > > I am working on improving the process we use to test backups are valid and > was wondering if Amanda could make my life easier. > > What I am looking for is a way to get amanda to store a hash of each file in > the backup so that I can restore the files to a new location and hash them > comparing against the stored hash to see if I have a valid restore. > > Is this possible? > > I would only want to store the hash on some backups as I think calculating > hashes for every backup might prove too high an overhead, though if not then > leaving it in place would help a lot for ensuring restore quality. > You could probably accomplish something like this with a custom APPLICATION setting for your backup that somehow wraps your backup program, i.e. dump or tar or amgtar or whatever, in a script that first calculates the hashes. This would guarantee that you're getting a hash of the file as you are backing it up. That seems difficult but not impossible. One thing you might look into is "dcfldd" (http://dcfldd.sourceforge.net/). It's a "dd" replacement that adds, among other useful features, cryptographic hashing. If you can guarantee that your files do not change as you back them up, e.g. if you're backing up a file system snapshot, an easier method would simply be to create a script that runs before the backup which calculates all the hashes and stores them somewhere with the files themselves. We use a script in some of our dumptypes that finds any file with a bogus timestamp (I work at college and our students currently write bogus time stamps when they're learning to do file manipulations) and fixes the time stamp to something more logical since tar can sometimes choke on bad time stamps. Similarly, you could have this calculate a hash for each file and store it with the backup. However, if your files can change between the time this script runs and the time the actual backup starts then this approach won't work. I hope that gives you some ideas. Markus --- Markus A. Iturriaga Woelfel, IT Administrator Department of Electrical Engineering and Computer Science University of Tennessee Min H. Kao Building, Suite 424 / 1520 Middle Drive Knoxville, TN 37996-2250 [email protected] / (865) 974-3837 http://twitter.com/UTKEECSIT
