Skip to main content

How do I recover files from the GCS Backup System?

All users of the Gina Cody School of Engineering and Computer Science's computing resources can access the school's on-line backup system. 

Documentation

The On-line Backup System creates "snapshots" (read-only copies of your files) at regular intervals. Under Unix, every directory mounted from Netapp has a ".snapshot" subdirectory with a number of entries. These ".snapshot" directories are not visible in a directory listing, nor do they come up in shell filename autocompletion; you must refer to these directories explicitly e.g., with ls -al .snapshot.

You can recover files that have been deleted or changed by copying files from a snapshot to your home (or other relevant) directory.

In order to recover a file, you will need to know that file's name and full path. First, find all available versions of your lost or damaged file under the ".snapshot" directory, then select the desired version of the file to be recovered, and copy it to an appropriate target directory.

Examples of how to view the contents of the ".snapshot" directory and how to recover a file can be found in the FAQ section below.

FAQ

The ".snapshot" directory is a special directory which appears as a subdirectory of each directory on the network filesystem. For example, /home/u/username/.snapshot (where username represents your GCS username and u represents the first letter of that username) contains snapshots of your Unix home directory. It will not appear in regular directory listings; you must specify it explicitly, for example:

[poise] [/home/u/username] > ls -la .snapshot

total 788 
drwxrwxrwx 40 root root 8192 Dec 2 15:36 ./ 
drwx--x--x 37 username username 64 Dec 2 15:42 ../ 
drwx--x--x 36 username username 64 Nov 25 17:32 encs_daily.2019-11-26_03/ 
drwx--x--x 36 username username 64 Nov 26 17:32 encs_daily.2019-11-27_03/ 
drwx--x--x 36 username username 64 Nov 27 17:32 encs_daily.2019-11-28_03/ 
[...] 
drwx--x--x 36 username username 64 Nov 29 10:50 encs_hrly1.2019-12-01_17/ 
[...] 
drwx--x--x 36 username username 64 Dec 2 14:38 encs_hrly1.2019-12-02_15/ 
drwx--x--x 35 username username 64 Aug 31 22:32 encs_termly.2019-09-01_33/ 
drwx--x--x 31 username username 64 Mar 8 2019 encs_weekly.2019-03-11_00/ 
[...] 

Note that the date and time that the snapshot was taken are encoded into the name of the snapshot, not in the timestamp shown in the directory listing.

The example below illustrates how to recover the lost or damaged file tempfile.txt in the home directory /home/u/username/ where username represents a GCS username and u the first letter of that username. You can follow a similar procedure in any directory.

At a Unix prompt, determine the full path of the lost file with:

find /home/u/username/.snapshot -name tempfile.txt -exec ls -ld {} \;

-rw-rw---- 1 username usr 9 Dec 2 13:07 /home/u/username/.snapshot/encs_hrly1.2019-12-02_13/tempfile.txt
-rw-rw---- 1 username usr 9 Dec 2 13:40 /home/u/username/.snapshot/encs_hrly1.2019-12-02_14/tempfile.txt 
-rw-rw---- 1 username usr 9 Nov 27 15:47 /home/u/username/.snapshot/encs_hrly1.2019-12-01_18/tempfile.txt 
-rw-rw---- 1 username usr 9 Nov 27 15:47 /home/u/username/.snapshot/encs_daily.2019-11-30_04/tempfile.txt 
-rw-rw---- 1 username usr 9 Nov 27 15:47 /home/u/username/.snapshot/encs_hrly1.2019-12-01_16/tempfile.txt 
-rw-rw---- 1 username usr 9 Nov 27 15:47 /home/u/username/.snapshot/encs_hrly1.2019-12-01_21/tempfile.txt 
-rw-rw---- 1 username usr 4 Nov 7 18:36 /home/u/username/.snapshot/encs_weekly.2019-11-10_03/tempfile.txt 
[...]

 

Select one version of the file to be recovered, and copy it to an appropriate target directory with (e.g.):

cp -p /home/u/username/.snapshot/encs_daily.2019-11-30_04/tempfile.txt /home/u/username/ 

For instructions, please view the document Recover Deleted File on GCS Network Drive.

Back to top

© Concordia University