How do you verify a restore?
There are a variety of tools available on Linux which are well-suited to this task. You can use mount.cifs to mount Windows shared folders on a Linux host, or you could just run Cygwin right on the file server.
Before starting the backup, use the find
command to recursively iterate from a specified directory and write the results to a file. This listing can be saved along with the backup for future use.
find /path/to/dir > list_before.txt
If you want to have checksums calculated for every file, just pass the output through md5
. This command only shows filenames because folders don't need hashes.
find /path/to/dir -type f -print0 | xargs -0 md5 > md5_before.txt
After restoring the backup, build another file list using the same command, then use diff
to find differences between them. Ideally, this command should give no output.
diff list_before.txt list_after.txt