-*-text-*- $Header: /CVSROOT/public/scylla-charybdis/md5backup/doc/restore.txt,v 1.3 2005/07/21 20:44:48 tino Exp $ How to use bin/md5restore.sh: ============================= Just run it with the file(s) to restore on the command line. It will try to locate all files with the given name (or part of name) and ask you which version to restore. It is dog slow and not optimized yet. It's just something to make restore a more easy task and not to provide a full featured restore capability. To restore some files in a directory and you don't know which, try cd directory; md5restore.sh "`/bin/pwd`" (this assumes md5restore can be found through the PATH and you have read access to the backup archive.) How to use bin/compare.sh as another restore script: ==================================================== There is a protoype script which can be tranformed into a restore, this is bin/compare.sh, for example to compare your last backup you can call: bin/compare.sh '' To make it a restore script, copy the script to another name, say bin/restoreall.sh, and change the line "MODE=compare" into "MODE=restore". Then be sure to find the second security belt (DUMMY) and disable it. If you got this, the restore should work. However it is untested up to today, so I must warn you that this is only for people who know how to write shell scripts. To do the restore just call: bin/restoreall.sh /backup/md5backup/log/`hostname -f` That shall bring back the state of your last backup (without metadata, so you have to set the execute flags of your binaries yourself etc.). However this does not select any single file or such, it restores everything! If you want to locate older versions of one file, you have to locate it manually in the logfile. The help for this is in the next paragraph: How to a manual restore (sort of): ================================== SORRY, yes, this is far from beeing something usable: Consult the log (/backup/md5backup/log/), it shows something like 2004-05-01 04:42:20 md5 6KB 6b672611d852122ee7ed17fd7b8c75a3 0 /var/log/messages Find the md5 sum (6b672611d852122ee7ed17fd7b8c75a3) and count (0) in this entry. You also see the location of the file (/var/log/messages). Find the file in the file store (/backup/md5backup/out/): # ls -al /backup/md5backup/out/6b/67/6b672611d852122ee7ed17fd7b8c75a3.0.md5 -rwxr-xr-x 2 root root 6285 May 1 06:42 /backup/md5backup/out/6b/67/6b672611d852122ee7ed17fd7b8c75a3.0.md5 As you guessed it, "6b/67/" comes from the first two/second two hex digits of the md5 sum. Well, that's all you need to know on how to restore a file. Today there is no real restore. It has to be written, sorry. However you have the contents, you have the logs, you have bin/compare.sh, so you have everything to recover (except the filesystem's metadata, though, if it was not gathered with odysseus, which is part of scylla-charybdis). YES, I AM WORKING ON AN IDEA FOR A BETTER RESTORE PART. (Including metadata and such, of course.) However as restore is so "easy" and must only be done in case something breaks severely, it just is not this important yet, I'm, sorry. -Tino $Log: restore.txt,v $ Revision 1.3 2005/07/21 20:44:48 tino bin/md5restore.sh added in the text Revision 1.2 2004/10/05 03:00:37 tino bin/compare.sh documented Revision 1.1 2004/05/09 20:57:48 tino added