In order to provide a sort of backup solution for accidental deletion of a files, snapshots of the core filesystem are available. In addition, snapshots allow comparison between different versions of a file.
Snapshots are created every 12h at 00:00 and 12:00 each day, 82 snapshots will be kept at any point in time. If the limit has been reached, the oldest snapshot will be removed in order to free space.
The frequency of snapshot creation determines the resolution of deleted files recovery.
For example: a file which was created and removed between two snapshots can not be restored. With the current configuration, you can roughly restore files from 40 days ago.
Snapshots use the following name convention
YYYY: 4 digit year, e.g. 2020
MM: 2 digit month, e.g. 01 for January
DD: 2 digit day, e.g. 01 for Monday
hh: 2 digit hour
mm: 2 digit minute
ss: 2 digit second
Please note: due to technical limitations, the snapshot accounts for all files in the filesystem (i.e. the direcory tree of /asap3/petra3/gpfs/), including scratch_cc. File operations in scratch_cc like for example dealing with tarballs should be carried in between two snapshot triggers if possible.
Also note that the raw-folder of any beamtime will be set to 'read only' (more precisely immutable) after a period of time. This on the one hand protects the raw data and also prevents file deletion, but also the creation/restoring of files. In case that file recovery is necessary for the raw folder after it has been set immutable, please contact a storage responsible by ticket system: email@example.com
Snapshot access on the core file-system
The snapshot directory can be accessed via 2 ways:
- Global Snapshot directory:
- Invisible Snapshot directory:
The global snapshots directory is available from every native GPFS client, e.g. on the Maxwell Compute Resources.
Additionally, every directory contains an invisible .snapshots directory, which is not listed in the default output of an
ls -la command.
You have to explicitly specify it on the command line, e.g.
ls -la .snapshots or
Deleted/Changed files can be restored by simply coping it from there.
If file: "name.ext" has been deleted from e.g. directory
- Find the latest snapshot
- copy the file from snapshot directory
cp /asap3/.snapshots/@GMT-YYYY.MM.DD-hh.mm.ss/<facility>/gpfs/<beamline>/<year>/<data>/<beamtime-ID>/processed/name.ext /asap3/<facility>/gpfs/<beamline>/<year>/<data>/<beamtime-ID>/processed
Snapshot access from Windows via SMB
Windows users can conveniently restore deleted/changed files with the "Restore previous versions" feature.
Right-click in a file or folder to be restored and select Restore previous versions
In the new pop-up window, select the desired version. If you click on Open, you can view the file from the snapshot without restoring it. To restore the file, click on Restore.
Snapshot access from Linux via NFS
The global snapshots directory is not accessible from the NFS mount. Please use the invisible snapshots directory as documented above to restore files.
Snapshot access from Linux via SMB
Unfortunately, a Restore previous versions equivalent is not available on Linux nor can you access the invisible snapshots directory. Please restore files by using a Maxwell node or a Windows client, with an SMB mount.