I accidentally deleted a file. How can I recover it?

Tagged:

Since the spring of 2005, HCS home directory data has been stored on a network appliance filer, courtesy of a very generous alum. A network appliance filer, for those of you who don't keep track of such things, is a fancy computer with some really big hard disks and a bunch of nify features, designed to make things like storing home directories safer and more convenient. Among the great bells and whistles include snapshot directories: every hour, every night, and every week, the filer takes a "picture" of your home directory and stores it somewhere for you to get at in the case of an emergency. To get at your snapshots, type:

ls .snapshot from your home directory. you'll see something like this:

jharvard-hcs@hera:~$ ls .snapshot
hourly.0 nightly.0 weekly.0 weekly.2
hourly.1 nightly.1 weekly.1

The numbers start at 0 for most recent and count up as the snapshots get older. To get the most recent copy of a file called "foo.txt," sit in your home directory and type:

cp .snapshot/hourly.0/foo.txt .

If you need help with this or with anything else, feel free to contact acctserv@hcs with the details of what you're trying to do.