deleted files and snapshots examples

snapshots

retrieving a deleted file

We take snapshots of /home every 4 hours and keep various daily, weekly, monthly, and yearly snapshots. Users can copy files from these snapshots if they accidentally delete a file from their home directory. These snapshots are stored on a machine called starfish. Here’s a complete example of getting a file back from our snapshots:

# go to machine where the snapshots are stored
ssh starfish

# look at dates and times and figure out which snapshot to use
ls -l /snapshots

# assuming you are csmajor1, and want to go back 4 days
cd /snapshots/daily.4/csmajor1

# copy a file from the snapshot back to your home directory
cp lostfile ~/csmajor1/.

There are many different snapshots, so it helps to know when the last time the file existed. For example, here are just a few of the snapshot directories:

$ ssh starfish
$ ls -l /snapshots
lrwxrwxrwx root Mar 20 00:45 daily.0   -> /m10vols/home-2018-03-20-0015
lrwxrwxrwx root Mar 19 00:45 daily.1   -> /m10vols/home-2018-03-19-0015
lrwxrwxrwx root Mar 18 00:45 daily.2   -> /m10vols/home-2018-03-18-0015
lrwxrwxrwx root Mar 17 00:45 daily.3   -> /m10vols/home-2018-03-17-0015
lrwxrwxrwx root Mar 16 00:45 daily.4   -> /m10vols/home-2018-03-16-0015
lrwxrwxrwx root Mar 15 00:45 daily.5   -> /m10vols/home-2018-03-15-0015
lrwxrwxrwx root Mar 23 16:15 hourly.0  -> /m10vols/home-2018-03-23-1615
lrwxrwxrwx root Mar 23 12:15 hourly.1  -> /m10vols/home-2018-03-23-1215
lrwxrwxrwx root Mar 20 04:15 hourly.2  -> /m10vols/home-2018-03-20-0415
lrwxrwxrwx root Mar 20 00:15 hourly.3  -> /m10vols/home-2018-03-20-0015
lrwxrwxrwx root Mar 19 20:15 hourly.4  -> /m10vols/home-2018-03-19-2015
lrwxrwxrwx root Mar 19 16:15 hourly.5  -> /m10vols/home-2018-03-19-1615
lrwxrwxrwx root Mar  1 08:45 monthly.0 -> /m10vols/home-2018-03-01-0815
lrwxrwxrwx root Feb  1 08:45 monthly.1 -> /m10vols/home-2018-02-01-0815
lrwxrwxrwx root Jan  1 08:45 monthly.2 -> /m10vols/home-2018-01-01-0815
lrwxrwxrwx root Dec  1 08:45 monthly.3 -> /m10vols/home-2017-12-01-0815
lrwxrwxrwx root Mar 18 04:45 weekly.0  -> /m10vols/home-2018-03-18-0415
lrwxrwxrwx root Mar 11 04:45 weekly.1  -> /m10vols/home-2018-03-11-0415
lrwxrwxrwx root Mar  4 04:45 weekly.2  -> /m10vols/home-2018-03-04-0415
lrwxrwxrwx root Feb 25 04:45 weekly.3  -> /m10vols/home-2018-02-25-0415
lrwxrwxrwx root Feb 18 04:45 weekly.4  -> /m10vols/home-2018-02-18-0415

So, if you last remember working on the file you want back on Jan 31, there’s a good chance a copy is available in the monthly.1 snapshot, which was done on “Feb 1 at around 8am”.

tape backups

We also try to make weekly tape backups of all user home directories. If the file you are looking for is not in the snapshots, email local-staff with the file name and directory, and we can see if it exists in one of our tape backups.


Back to SwatCS Help Docs