Passer au contenu principal

Recovering deleted files?

This depends on where the file was and when it was created and deleted.

/scratch

There is no backup and no snapshots so the file is gone forever. 

/users

If it was in your home directory /users/<username>  then you can recover files from up to 7 days ago using the built-in snapshots by navigating to the hiddensnapshot .snapshot directory as follows:

[ulambda@login1ulambda@login ~]$ pwd
/users/ulambda

[ulambda@login1ulambda@login ~]$ date
Tue JanJun  141 12:00:0013:59:28 CETCEST 20202021

[ulambda@login1ulambda@login ~]$ $ cd /users/.snapshotsnapshots/

[ulambda@login1ulambda@login .snapshot]snapshots]$ ls
2020.01.08.01.00.02.HPCU_user2021-05-26  2020.01.09.01.00.01.HPCU_user2021-05-27  2020.01.10.01.00.01.HPCU_user2021-05-28  2020.01.11.01.00.01.HPCU_user2021-05-29  2020.01.12.01.00.01.HPCU_user2021-05-30  2020.01.13.01.00.01.HPCU_user2021-05-31  2020.01.14.01.00.01.HPCU_user2021-06-01

[ulambda@login1ulambda@login .snapshot]snapshots]$ cd 2020.01.10.01.00.01.HPCU_user2021-05-31/ulambda

[ulambda@login1ulambda@login 2020.01.10.01.00.01.HPCU_user]]$ pwd
/users/.snapshots/2021-05-31/ulambda

[ulambda@login ]$ ls
..
my_deleted_filemy_deleted_file_from_yesterday
..
..


If the file was in a subdirectory then you can also open .snapshot directly in the affected directory.

The snapshots are taken at 1amaround 3am in the morning so if you created a file in the morning and deleted it the same afternoon then we can't help.

Beyond 7 days the file is lost forever.