File systems on ENGR home directories (Z drive) and research file servers such as "depot" or "farm" allow users to restore previous versions of files and directories from snapshots taken on the hour. This is very useful when a file may become corrupt, or something is accidentally deleted, as you can quickly restore yourself.

If you aren't comfortable with UNIX, Citrix offers a windows environment that can be used to restore snapshots even if you don't own a windows machine.

A basic understanding of UNIX commands is needed here. If commands such as ls, cd, cp, etc. are foreign to you,
read through a Linux primer online, or get help from a friend.

From a terminal window, ssh to access.engr.oregonstate.edu and login with your ENGR account.
Choose your terminal emulation (xterm will usually do the trick):

snapshot restore ssh image 1

Snapshots are enabled in both home directories on stak and on research file servers such as depot.
Every directory on stak and depot has a .snapshot directory. It is hidden, so once in the directory you are looking to restore, simply change directory (cd) to .snapshot

As an example you might cd ~/Windows.Documents/Desktop/.snapshot to see the snapshots of the directory ~/Windows.Documents/Desktop
~ is a shortcut to your home directory on stak.

Or for files on other file servers, use nfs to browse (cd /nfs/depot/xxx/xxx.../.snapshot). 
In this example, the file I wish to restore is in depot/cce_u1/montagne:

snapshot restore ssh image 2

Using ls, list the directory contents to see all the snapshots (hourly and daily snapshots are shown as directories).

snapshot restore ssh image 3

Change directories to the snapshot you wish to recover from with another cd command:

snapshot restore ssh image 4

List the contents and using ls and you will see the files in the directory from that snapshot: Use cp to copy the file. In this example I am copying previous version of Visionapp.vrb back to my home directory and renaming it Visionapp.vrb.new.

snapshot restore ssh image 5

From the Windows operating system, right click the directory or file you wish to restore and select "Properties":

Next select the file or directory you wish to recover and select COPY or RESTORE. You may see several versions in the list depending on how many times there have been changes. When doing a RESTORE, it would be prudent to rename the existing file, or just use COPY to be safe: 

 

A restore WILL overwrite the version you have, so be careful:

 

Restoring a directory, especially a shared directory, can be tricky. You may not "own" all the files in the directory. Emailing support and ask us to restore for large directory trees would be best.

Also, when doing copies, be cognizant of your quota. It can be easy to exceed your space limitations restoring copies of things, especially large directories. Again, ask support if you aren't sure if you have the space to do a copy.