212 - Was sind und wie funktionieren Snapshots?

Snapshots provide an easy way to reconstruct accidentally deleted, modified or damaged files or directories. Any user can find and restore older versions themselves (user-controlled recovery) without having to contact an administrator, service desk, etc.

How do snapshots work? The storage system automatically and regularly takes snapshots of all files and directories that exist in a file store at the time of the snapshot. Thus, snapshots are not a type of backup copy of every version of a file or directory that has ever existed, but only specific versions at defined points in time.

Snapshots created by the storage system can only be read (read only). However, files or directories restored from these snapshots can be edited again as normal. The space used by snapshots on the file server is not counted against the quota set for the area (=usable space). For snapshots, an additional storage area (default 5% of the volume size) is reserved when a storage volume is created. However, in special cases (e.g., infrequent, very large changes to the entire dataset), snapshots may consume more disk space than is allocated for them. In this case, snapshots reduce the storage space on the file server and the snapshot area is partially resized.

A fixed number of snapshots is always kept: when a new snapshot is created, the file server automatically deletes the oldest snapshot of the same type and rotates the numbering of all other snapshots. There are three different types of snapshots, which are summarized in the following table.

snapshot category

Schedule for creation and storage

hourly

Each x hours, e.g. um 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18 and 20 o'clock

The last 42 snapshots are kept.

(„hourly.JJJJ-MM-DD-TTTT“)

daily

Daily at midnight

The last 14 snapshots are kept

(„daily.JJJJ-MM-DD-TTTT“)

weekly

Every week on Sunday at midnight

The last 9 snapshots are kept.

(„weekly.JJJJ-MM-DD-TTTT“)


Restoring data from a snapshot is easy. Here, individual users can restore the data from the snapshots on their own. For example, one can copy an older version of a currently corrupted file to the current directory. It is important to remember that a file must have been present in the file store at the time the snapshot was taken for it to be preserved in the snapshot.

The following figure shows different scenarios of how files are kept in snapshots. For simplicity, only daily snapshots are shown.

File A was created "the day before yesterday" and was captured for the first time in snapshot "daily.1". It is the same with file B, where it was deleted "yesterday" - that is, between daily.1 and daily.0. However, it can be retrieved from the daily.1 snapshot.

File C was created between the snapshots daily.1 and daily.0 and immediately deleted again. Thus it is not present in any of the snapshots and thus cannot be recovered (in reality it would probably be preserved in one of the "hourly" snapshots created "every 4 hours").

File D has been edited and saved several times. So the snapshot "daily.2" contains the state of "Saved 0", daily.1 the state of "Saved 1" but daily.0 only the state of "Saved 3". So these three versions could be retrieved