I need files that were corrupt or deleted. How do I get them back?
Home directories and most project spaces use snapshots, meaning that older versions of deleted or changed files are kept in a snapshots directory for between two and four weeks. You can access these snapshot files without contacting the Help Desk, but the Help Desk will be happy to assist with the restore from snapshot process. Here are the steps to restore a file or directory from snapshot
Note: There is no snapshot for scratch space. If the deleted or corrupt files were stored in scratch space, such as /scratch.global, it is not possible to restore them.
From your home directory or project directory, use the change directory command to access the snapshot directory
cd .snapshot
Note: the .snapshot directory is always hidden, and will not be listed by the ls command.
Once you are in the snapshot directory, you will see the available snapshot subdirectories dated with when the copy was made. You can copy the desired version of your file back to your home directory or project shared direct ory using cp command, and then continue to use it as normal.
VAST file system (e.g. /projects/standard/...) has six nightly and four weekly snapshots. This means there are seven snapshots within the last seven days plus four additional snapshots within the last month.
If you cannot find the desired files in the on-disk snapshots, you can email [email protected] with the full path to the files and any details about the content of the file. See the Policies page for data protection and retention policies.
Steps to restore a file or directory from snapshot
- Navigate to the parent directory where the file was deleted, and change directory into '.snapshot'
cd .snapshot
- List out the available snapshots and take note of the most recent date that is listed
ls -ltr
- Change directories into the most recent snapshot and check whether your file/directory is present.
- If the file/directory is not present, check the other snapshots for copies
- If the file you want to restore is present, use the copy command 'cp' to copy the file back to the parent directory
cp -a FILE_NAME ../..- Replace FILE_NAME with the file or directory that you are restoring.
- After the copy is complete, change directories back to the parent directory
cd ../..