Recover deleted or corrupted files on IU research computing systems

To reduce the risk of accidentally losing data, the home directory file system on Indiana University's research computing systems takes nightly snapshots of each directory's contents, and then stores them in a hidden .snap directory within the source directory.

To recover a deleted or corrupted file:

  1. Navigate to the .snap directory within the directory with the missing or corrupted file; for example, if you need to recover a file from a directory called ~/work_dir, on the command line, enter:
      cd ~/work_dir/.snap
  2. List the contents of the directory; on the command line, enter:
      ls -apl

    You'll see a list of directories similar to this:

      [user1@login1:~> cd ~/work_dir/.snap
      [user1@login1:~/work_dir/.snap> ls -apl
      total 1
      dr-xr-xr-x 44 root     root 32768 Nov 14 00:01 ./
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 ../
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.06-04.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.08-04.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.09-04.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.10-04.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.11-04.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.10.12-04.01.01/ 
      ....
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.11.09-05.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.11.10-05.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.11.11-05.01.01/
      drwxr-xr-x  2 user1 unit  4096 Jun 11 11:54 @GMT-2014.11.12-05.01.01/
      drwxr-xr-x  2 user1 unit  4096 Nov 12 09:23 @GMT-2014.11.13-05.01.01/
      drwxr-xr-x  2 user1 unit  4096 Nov 13 10:26 @GMT-2014.11.14-05.01.01/
     
  3. Change to the directory that contains the last best version of your file (depending on when the file was deleted or corrupted); for example, if the file you need was deleted or corrupted on November 12, 2014, change to the directory from the day before (e.g., @GMT-2014.11.11-05.01.01):
      cd @GMT-2014.11.11-05.01.01
  4. List the contents of the directory to verify the file you need is there, and then copy the file to its original directory.

If you can't find the file you need, email the UITS High Performance Systems group.

This is document azvw in the Knowledge Base.
Last modified on 2018-10-10 18:25:47.

Contact us

For help or to comment, email the UITS Support Center.