From CsWiki
Jump to: navigation, search

snapshot - A tool for recovering deleted files and directories

The files in your home directory are backed up a number of times a day.

Use the snapshot command to restore an earlier version of a file that you have changed or deleted.

In a UNIX shell, type


Now enter a command. The most useful commands are:

 cd {dir}                            -  change to directory {dir} e.g. cd labc/ex1
 lsv {file}                          -  list all versions of {file} e.g. lsv test.c
 cpv {number}                        -  recover version {number} eg. cpv 3
 shv {cmd...} {number}               -  run {cmd} on version {number} 
 changetime {datetime}               -  change time to {datetime} e.g. changetime Mar 19 10:00
 ls                                  -  list all files in this directory as they were at that time
 cp {file}                           -  recover {file} e.g cp test.c
 rename                              -  add suffix .R to any file recovered
 help                                -  list all commands

Note: The changetime command takes you to the state of the directory as it was at the last backup previous to that time.

The command prompt shows the name of the directory and the time of the backup e.g. /cs/stud/dib/labc/ex1 [Mar 19 10:00:00]