snapshot-restore
The Circe utility snapshot-restore is useful in situations where a user accidentally deletes an important file, and would like to restore the file from our backup infrastructure. The best way to understand how to use it is by example:
Suppose the user aastaneh is working on a class project due tomorrow, and accidentally deletes the file ~aastaneh/allmightyscript.pl, which is the project source code:
[aastaneh@login0 ~]$ rm allmightyscript.pl
Instead of panicking, he merely executes snapshot-restore:
[aastaneh@login0 ~]$ snapshot-restore Welcome to the Circe Backup Restoration Utility! Here are the available snapshots: (1) 2008-10-30 (2) 2008-11-01 (3) 2008-11-02 (4) 2008-11-03 (5) 2008-11-04 Please choose a snapshot date you wish to restore from:
The user is given a list of snapshots sorted by date to choose from. He chooses option 5, since it is the most recent:
Please choose a snapshot date you wish to restore from: 5 Chose date 20081104030000.. Now in File Restore Environment Restricted Command Set: cd <dir>, exit, ls, restore <file/dir> backupsh aastaneh>
Now the user is placed in a rudimentary command shell environment, able to change directories(cd <dir>), do a directory listing(ls), and restore a file or directory (restore <file/dir>). He first does an ls to look for the lost allmightyscript.pl:
Restricted Command Set: cd <dir>, exit, ls, restore <file/dir> backupsh aastaneh> ls . .. .bash_history .bash_logout .bash_profile allmightyscript.pl stuff backupsh aastaneh>
He sees that the script exists, and restores it:
backupsh aastaneh> restore allmightyscript.pl
Restoring file allmightyscript.pl to /home/student/aastaneh/allmightyscript.pl-20081104030000
sending incremental file list
allmightyscript.pl
11342 100% 0.00kB/s 0:00:00 (xfer#1, to-check=0/1)
sent 11447 bytes received 31 bytes 22956.00 bytes/sec
total size is 11342 speedup is 0.99
He exits, and finds the file in his home directory, appended with the snapshot date in the filename:
backupsh aastaneh> exit [aastaneh@login0 ~]$ ls allmightyscript.pl* allmightyscript.pl-20081104030000 [aastaneh@login0 ~]$
The user now has a copy of the lost file from the date it was backed up.