How can I recover a file I just deleted from my locker?
- How do I recover a file from my backup volume?
- How do I restore a file from OldFiles?
Context
- This answer is specific to the Athena computing environment
- The commands referred to herein are AFS and Athena specific and do not exist on normal Linux and Unix systems
Answer
If you have something called OldFiles in your home directory, that is your backup mount point. To recover a file from your backup volume, find the file in OldFiles, or one of the sub-directories in there. When you have found it, you can retrieve that file into your home directory by typing:
cp filename ~/
You can then move it to wherever it belongs in your original directory.
If you do not have the OldFiles mount in your home directory, you have to create one. To do so, type:
cd ~/ fs mkm OldFiles user.username.backup
...where username should be replaced with your username). Then follow the directions above. If you wish to remove this mount when you are done, type:
cd ~/ fs rmm OldFiles
See also
- For more information about OldFiles, see What is the OldFiles directory?
- For information on restoring files deleted more than one day ago see How can I get a file restored from the AFS backups?