Restoring files from the trash bin¶
When you delete a file or a folder in CERNBox, it is not permanently deleted at that very moment. Instead, it is moved into the trash bin where it is kept for 4 weeks.
Restore using the web interface¶
The restoring of a deleted file from the recycle bin can be done by the owner, for personal spaces, or by one of the administrators, for project spaces. Project administrators are all members of the cernbox-project-<projectname>-admins
group.
Note
If the trash bin contains a large number of files that cannot be conveniently displayed in a web interface, you have to use the command-line interface as described in the next section.
Personal files¶
With your Primary Account, open your trashbin and browse for the files/folders you want to restore.
Click on the button (or right-click) next to the file you want to restore and click on the button from the context menu which appears.
Project files¶
If you are an administrator of a project, you can also restore files in the exact same way as restoring personal files. To access the trash bin of a project, click the "Deleted files" on the left sidebar, and then choose which project you want to see.
Restore using the command-line interface¶
This operation is restricted to the Account that owns the space (Primary Account for a personal space, Service Account for a project space). To restore a file:
-
Login on lxplus with your Primary Account
-
If the restore concerns a project space, obtain a kerberos token for the corresponding Service Account
-
Set the remote eos address:
-
For personal areas,
export EOS_MGM_URL=root://eosuser.cern.ch
-
For project spaces,
export EOS_MGM_URL=root://eosproject.cern.ch
-
List the recycle bin files for your account:
eos recycle ls
-
Copy the RESTORE-KEY for your file
-
Restore the file:
eos recycle restore pxid:<RESTORE-KEY>
See example below:
Check that the versions got restored by the eos 'ls -al' command:
eos ls -al /eos/project/<initial>/<project-name>/<path-to-.sys.v#-folder>
e.g. eos ls -al /eos/project/s/swanee/annotation3d.C.nbconvert/.sys.v#.README.docx