New York University Faculty of Arts and Science College of Arts and Science Graduate School of Arts and Science

Data Backups

We provide several backup options for your CIMS data.

Home Directory Backups (/home)

The Systems Group maintain tape backups of your home directory.  We also maintain up to 2 nights of snapshots on disk.  These snapshots are accessible in the new and old directories under ~/.zfs/snapshot.  The new directory is a snapshot of your home directory taken the night before (or early morning of the same day), and the old directory contains the snapshot taken two nights ago.  If you have just changed/deleted a file and would like to recover a version from up to two days ago, you may find it in one of the snapshot directories.

You can use the cp command to restore a file from a snapshot.  In the following example a user deletes a file test.txt from his home directory and then restores the file from a snapshot using cp:

joe@linax1[~]$ ls -l test.txt
-rw-------+ 1 joe joe 67 Oct 15  2010 test.txt
joe@linax1[~]$ rm test.txt
rm: remove regular file `test.txt'? y
joe@linax1[~]$ ls -l test.txt
ls: cannot access test.txt: No such file or directory
joe@linax1[~]$ cd ~/.zfs/snapshot/new
joe@linax1[new]$ ls -l test.txt
-rw-------+ 1 joe joe 67 Oct 15  2010 test.txt
joe@linax1[new]$ cp -a test.txt ~/
joe@linax1[new]$ cd ~
joe@linax1[~]$ ls -l test.txt
-rw-------+ 1 joe joe 67 Oct 15  2010 test.txt
joe@linax1[~]$

The cp command will sometimes fail to restore file from a snapshot if the destination file still exists, complaining that the source and destination files are the same.

joe@linax1[~]$ ls -l test.txt
-rw-------. 1 joe joe 67 Oct 15  2010   test.txt
joe@linax1[~]$ echo "blah" >> test.txt
joe@linax1[~]$ cd .zfs/snapshot/new/
joe@linax1[new]$ cp -a test.txt ~/
cp: `test.txt' and `/home/joe/test.txt' are the same file
joe@linax1[new]$

To work around this issue you can rename the destination file or use another command such as rsync, tar or cpio to restore it.  Here's is an example of how to use cpio to restore a file:

joe@linax1[new]$ ls test.txt | cpio -padmuv ~/
/home/joe/test.txt
1 block
joe@linax1[~]$ ls -l ~/test.txt
-rw-------. 1 joe joe 67 Oct 15  2010   test.txt
 

Feel free to request a restore of older files from tape archives.

Data Directory Backups (/data)

The Systems Group maintains a nightly backup of your data directory.  If you have just changed/deleted a file and would like to recover the version from the previous backup you could be in luck.  Feel free to request a restore of older files from nightly backups.

Laptop Data Backups

The Systems Group maintains a laptop data backup system available to eligible CIMS affiliates.  If interested in this service request laptop backup access.