File recovery from a snapshot on Storage@Yale
Snapshots are read-only copies of the entire file system. The contents of each snapshot reflect the state of the file system at the time the snapshot was created. It is easy to navigate through each snapshot as if it were still active. Your directories and files will appear as they were at the time that the snapshot was created. A daily snapshot is taken every night, at approximately midnight, and a weekly is taken every Sunday, also at approximately midnight. These copies of your data do not count against your quota. A minimum of 7 daily snapshots and 7 weekly snapshots are retained. These are stored in a hidden .snapshot directory. The directory will not be visible, even using an "ls –a" command, but it is there.
What follows is a simple example of the procedure to recover a file. You will need to modify it as necessary for more complex directory structures, and for recovering multiple files at one time.
cd to top level Storage@Yale directory
[yournetid@login-0-0 ~]$ cd /SAY/standard/fas/yourgroup/yournetid
cd to hidden .snapshot directory
[yournetid@login-0-0 yournetid]$ cd .snapshot
ls to see available snapshots (7 days + 7 weeks)
[yournetid@login-0-0 .snapshot]$ ls daily.2016-01-14_0010 daily.2016-01-15_0010 daily.2016-01-16_0010 daily.2016-01-17_0010 daily.2016-01-18_0010 daily.2016-01-19_0010 daily.2016-01-20_0010 daily.2016-01-21_0010 weekly.2015-12-06_0015 weekly.2015-12-13_0015 weekly.2015-12-20_0015 weekly.2015-12-27_0015 weekly.2016-01-03_0015 weekly.2016-01-10_0015 weekly.2016-01-17_0015
cd to desired date’s directory and ls to see available files
[yournetid@login-0-0 .snapshot]$ cd daily.2016-01-21_0010 [yournetid@login-0-0 daily.2016-01-21_0010]$ ls saytest.txt testfile.txt
Copy desired file to desired new location with the same name
[yournetid@login-0-0 yournetid]$ cp /SAY/standard/fas/yourgroup/yournetid/.snapshot/daily.2016-01-21_0010/saytest.txt /SAY/standard/fas/yourgroup/yournetid/saytest.txt
Or to a new directory
[yournetid@login-0-0 yournetid]$ mkdir restdir [yournetid@login-0-0 yournetid]$ cp –t /SAY/standard/fas/yourgroup/yournetid/restdir /SAY/standard/fas/yourgroup/yournetid/.snapshot/daily.2016-01-21_0010/saytest.txt