You are here

Introduction to the ENCS on-line backup system

All users of ENCS's computing resources can access the on-line backup system, which creates 'snapshots' (read-only copies of your files) at regular intervals. Under Unix, every directory mounted from the central file server has a ".snapshot" sub-directory with a number of entries. The ".snapshot" directory doesn't appear in the output of "ls" unless you specify it explicitly. You can recover files that have been deleted or changed by copying files from a snapshot to your home directory.

[grace] [/home/u/username] > ls -la .snapshot
total 3088
drwx------ 58 username username 53248 Sep 27 17:03 hourly.0
drwx------ 58 username username 53248 Sep 27 17:03 hourly.1
....
drwx------ 57 username username 53248 Sep 23 17:24 hourly.27
drwx------ 57 username username 53248 Sep 23 17:24 nightly.0
drwx------ 57 username username 53248 Sep 23 17:24 nightly.1
....
drwx------ 59 username username 53248 Sep 13 22:21 nightly.11
drwx------ 57 username username 53248 Sep 23 17:24 weekly.0
drwx------ 58 username username 53248 Sep 17 17:47 weekly.1
....
drwx------ 59 username username 24576 Jun 6 23:23 weekly.16

The timestamps shown do not reflect the date and time that the snapshot was made. Look inside each snapshot to see the timestamps of the files you are interested in.

Recover a file

You need to know:

  • The name of the file.
  • Where the file was (its path).

To recover a lost file:

  • Find all available versions (timestamp) of your lost file in each sub-directory of the ".snapshot" directory.
  • Select the desired version of the file to be recovered, and copy it to an appropriate target directory.

Recover a file from Windows:

AN EXAMPLE: (a file called tempfile.txt was deleted in your Unix home directory U:\ )

To recover a lost file, Here is the procedure:

1. Double-click on "My Computer" icon on your desktop

Snapshot Figure1

2. In the address bar, just type in: U:\.snapshot ( or U:\~snapshot )

Note: If the file was saved in your windows home directory, just change the letter U:\ as G:\ .

Snapshot Figure2

3. Click "Search" in the tool bar.

Snapshot Figure3

 

4. Click "All files and folders", In the All or part of the file name field, type the name of the file you want to search for: tempfile.txt, then click "Search" button.

Snapshot Figure4

5. Your search results will display on the right side of the Search Results window, select one version of the file to be recovered, and copy it back to your unix home directory U:\.

Snapshot Figure5

 

Recover a file from Linux/Unix:

AN EXAMPLE: (a file called tempfile.txt was deleted in your unix home directory /home/u/username)

To recover a lost file, here is the procedure:

1. At your UNIX prompt please type:
ls -la /home/u/username/.snapshot/*/tempfile.txt

NOTES:

  • If you don't remember which sub directory the file was saved, please type:
    find /home/u/username/.snapshot/*/ -name tempfile.txt -exec ls -la {} \;
  • Do not actually type /home/u/username. "u" is the first letter of your username, so for user j_smith:
    ls -la /home/j/j_smith/.snapshot/*/tempfile.txt

Now you get all available versions of your lost file listed in .snapshot subfolder.

-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/hourly.0/tempfile.txt
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/hourly.1/tempfile.txt
....
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/hourly.27/tempfile.txt
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/nightly.0/tempfile.txt
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/nightly.1/tempfile.txt
....
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/nightly.11/tempfile.txt
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/weekly.0/tempfile.txt
-rwx------ 1 username 22 Jun 28 16:24 /home/u/username/.snapshot/weekly.1/tempfile.txt
....
-rw------- 1 username 13 May 18 11:16 /home/l/leonlg/.snapshot/weekly.16/tempfile.txt

2. select one version of the file to be recovered, and copy it to an appropriate target directory.
cp /home/u/username/.snapshot/hourly.0/tempfile.txt /home/u/username/