On IU's research systems, how can I recover deleted or corrupted files?

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 2017-01-18 16:42:04.

  • Fill out this form to submit your issue to the UITS Support Center.
  • Please note that you must be affiliated with Indiana University to receive support.
  • All fields are required.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.

  • Fill out this form to submit your comment to the IU Knowledge Base.
  • If you are affiliated with Indiana University and need help with a computing problem, please use the I need help with a computing problem section above, or contact your campus Support Center.

Please provide your IU email address. If you currently have a problem receiving email at your IU account, enter an alternate email address.