Dear users of CSCS! This page is only applicable to Piz Daint XC 40/50 system. Documentation for Alps is coming

GPFS Snapshots provide an online backup that allows easy recovery from common problems such as accidental deletion of a file or the need to compare older versions of the same file. Snapshots of the GPFS file systems /users, /project and /store are taken every day for the last seven days, while older snapshots are deleted automatically. Snapshots of a file system are read-only; changes can only be made to the active non-snapshots files and directories.

How to restore a file from GPFS snapshots

GPFS snapshot creates a .snapshots subdirectory within every folder in the GPFS file system: that hidden folder holds several subdirectories with a daily backup for each one of the last seven days, starting from the current one. The name of these subdirectories follow the format snap-YYYYMMDD.

Snapshots directories are not visible to the ls command or readdir() function: this is meant to prevent recursive file system utilities - such as find or tar - from entering into the snapshot tree for each directory they process.

For example, the command ls -a /project/<group_id> does not list the hidden read-only folder .snapshots, but both ls /project/<group_id>/.snapshots and cd /project/<group_id>/.snapshots do. Similarly, you can list the snapshots under the $HOME folder /users/$USER and the folder /store/<group_id>, if applicable to your group.

$ ls /project/<group_id>/.snapshots 


snap-20150610 snap-20150611 snap-20150612 snap-20150613 snap-20150614 snap-20150615 snap-20150616

Recovering a file or a directory from GPFS snapshots is straightforward. For instance, type cd /project/<group_id>/.snapshots and choose the most convenient snapshot among the available dates, then copy the old file to the original directory. Example:

The file /project/mygroup/myfolder/myfile has been deleted or modified by mistake and you want to retrieve the version of the day before.

$ cd /project/mygroup/myfolder/.snapshots

$ ls
snap-20150610  snap-20150611  snap-20150612  snap-20150613  snap-20150614  snap-20150615  snap-20150616

$ cd snap-20150615

$ ls
myfile

$ cp myfile /project/mygroup/myfolder

Data Backup

GPFS snapshots providing interactive data recovery are limited to the last seven days, however data belonging to active projects in the filesystems /users, /project and /store are under backup and it can be recovered on demand.

The following retention policies apply for data backup of active projects:

  • each file in the filesystem under backup has a maximum of three copies in the backup system
  • when a file is modified, the previous version (extra copy) is kept along with the newly modified one (primary copy)
  • when a file is deleted, the extra copies are deleted immediately from the backup system. After 90 days, also the primary copy is deleted from the backup system

Please note that as soon as your project expires, the corresponding data backup will be disabled immediately. Therefore no data backup will be available anymore after the final data removal: please check the applicable filesystems policies and the grace period granted after the expiration of the project.