Every directory on the Linux systems has a hidden directory called .snapshot.  If you go into that (cd .snapshot), you’ll find a list of directories with various dates and times:

[student@linuxremote1 ~/.snapshot]$ ls -lu
total 1056
drwxr-x--x 104 student student 86016 Sep 25 00:00 daily.2014-09-25_0000
drwxr-x--x 104 student student 86016 Sep 26 00:00 daily.2014-09-26_0000
drwxr-x--x 104 student student 86016 Sep 27 00:00 daily.2014-09-27_0000
drwxr-x--x 104 student student 86016 Sep 28 00:00 daily.2014-09-28_0000
drwxr-x--x 104 student student 86016 Sep 29 00:00 daily.2014-09-29_0000
drwxr-x--x 104 student student 86016 Sep 30 00:00 daily.2014-09-30_0000
drwxr-x--x 104 student student 86016 Oct 1 00:00 daily.2014-10-01_0000
drwxr-x--x 104 student student 86016 Sep 30 12:00 hourly.2014-09-30_1200
drwxr-x--x 104 student student 86016 Sep 30 16:00 hourly.2014-09-30_1600
drwxr-x--x 104 student student 86016 Sep 30 20:00 hourly.2014-09-30_2000
drwxr-x--x 104 student student 86016 Oct 1 04:00 hourly.2014-10-01_0400
drwxr-x--x 104 student student 86016 Oct 1 08:00 hourly.2014-10-01_0800

If you then go into one of these directories, you’ll see your files as they existed at that particular date and time.  Simply copy the file(s) you wish to recover into the appropriate place in your home directory, e.g.:

[student@linuxremote1 ~/.snapshot/daily.2014-09-30_0000]$ cp myfile ~/myfile

The above command would copy myfile from the midnight on Sep. 30, 2014 snapshot to the user’s home directory.

If you need a file or directory restored prior to the time available in the snapshots, please email ecst@bucknell.edu with the location of where the file was and from what date you’d like it restored.  We can restore files up to six months ago.

For additional information or assistance, please contact the Tech Desk at 570.577.7777 or techdesk@bucknell.edu.

Keywords: backup, Linux, restore