The Synology NAS has a very handy and safe feature in the form of snapshots. With that you can always retrieve an earlier version of a file. Perfect if you accidentally delete a file or folder. You no longer have to pull your hair out of your head from now on!
Everyone makes a mistake from time to time. Especially when it is a bit hectic in this homeworking period. Consider accidentally deleting a file in one of the folders on your NAS. Or even a complete folder with content. You can also edit a photo and overwrite the original instead of saving the file under a new name. Or perform a similar action with a Becomedocument, while the original should also have been kept.
In short: a file that should have been saved disappears. Normally it is then over and out. Occasionally you may be able to recover an original file with a lot of art and flying work and a specialized tool. But that gets very tricky on a NAS where that tool is often not available. To avoid all that misery, you can activate snapshots on Synology NAS.
Snapshots, the ‘endless trash can’
Snapshots are like ‘photos’ that are taken from a selected folder (or folders) at regular intervals. It is not a backup in the truest sense of the term. This is because a complete copy of the folder (s) is not made every time. Good thing too, because otherwise your NAS would fill up very quickly with data and you would keep buying larger hard drives.
Snapshots are a lot more practical and storage-friendly. Only the changes are saved, using a smart system under the hood. The whole produces an efficient and lightning-fast whole. A snapshot of a folder with a few hundred Gigabytes of content is made in a few seconds.
Because a NAS usually mainly stores files that are hardly changed – except for the files that you are currently working with, the rest being archives – the snapshots also take up little disk space. For example, enable snapshots for a photo archive folder and you never have to worry about losing an original photo for good through a moment of negligence.
BTRFS
To use snapshots on your Synology, you must have a copy that supports the BTRFS file system. That are many copies of the past years (even an ‘antique’ DS412 + from 2012 can handle it – provided it is kept up to date in terms of operating system), and in this article we assume that your NAS uses BTRFS (works differently). it really isn’t!). For a list of compatible NAS, see this page (just scroll all the way down). Then it is important to install the Snapshot Replication app via Package Center (found via a click on the start button at the top right, in the web interface of your NAS after logging in). To do this, click – how could it be otherwise – on the Install button for the said app.
A message will then appear stating that the Replication Service component must also be installed for this; click on Yes to confirm and wait for it to be completely downloaded and installed. Package Center can now be closed. In the underlying window – a notification from the firewall on the Synology – click OK to open a specific port (if prompted).
Activate
To configure snapshots, click on the newly added app in the start menu Snapshot Replication. In the main window of the app, a notification may appear below the heading Optimize replication performance. If necessary, follow the suggested steps. If you are not sure whether this will affect other apps, simply click OK. Experience has shown that the impact on speed is usually not that bad. And otherwise you can always worry about it again in the future. In the main window of the app, click in the column on the left Snapshots, and then right on a map where you want to activate the feature. In our example, we click on the folder photo. With the folder selected, click the button Settings. In the opened window, switch below Schedule the check box for Enable snapshot scheduling in. Behind Days select the days on which a snapshot should be taken, followed by the time and frequency.
Frequency
click on To keep at the top. To prevent too much storage space on the NAS being used for snapshots, it is wise to set the option Specify the number of daily snapshots you want to keep to, for example, 100 or, if necessary, 365. In the latter case, you have an overhaul for every day of the year, seems more than enough to us. When the maximum is reached, the oldest snapshots are simply overwritten and the whole game starts again.
Even more beautiful (and more regular)
If you have the option Advanced retention policy activates and then the button Set rules you can set the whole thing even more beautifully. By default, snapshots are made per hour. One daily snapshot is then saved at the end of the day. That daily snapshot is consolidated into one weekly occurrence at the end of the week. In short: extra safety while working, without creating an extreme amount of snapshots! Which method you choose depends on your needs.
First snapshot manually
On the tab Advanced you could possibly add the option Snapshot visible can switch on. Then users can browse their snapshots themselves. click on OK and again OK to confirm to make the settings. You can now take a first snapshot manually. To do this, click the button – with the desired shared folder still selected Snapshots and then on Take snapshot. Give the snapshot a name and leave the Lock option on. In this way, this version will always be saved. click on OK and the process starts, recognizable by the blue text Process at the folder. As you can see, this is going fast!
See
To view the snapshots, click the button again Snapshots and then Snapshot list. You’ll see the first snapshot (more will appear in the list over time, of course); to restore an accidentally deleted file, select a snapshot and click Leaves. You may still be asked to make snapshots visible, then of course give permission. You will then see all files in the snapshot.
Example
To illustrate how it works, close the File Station app (Synology’s file manager). Restart this app and browse to the photo folder. Select a photo and delete it (to play it safe, you may want to make a copy to another folder first…). Delete in our example Example01.tif. Go back to the Snapshot Replication app, select the snapshot from the photos folder and click the button again Snapshots and then Snapshot list. Select the previously taken snapshot and click the button Leaves. And there we see our just ‘accidentally’ deleted file again!
To restore it, right-click on it – in this case Example01.tif -, choose copy and then browse to the root folder photos to paste it there. Problem solved! In order not to overwrite any edited photo accidentally saved under the same name, you can either rename this edited photo first (the most obvious way) or paste the snapshot copy into another folder.
The nice thing is that if you have previously activated the option to show snapshots to users as well, the folder with snapshots is also visible in, for example, Windows Explorer. Neatly arranged in chronological order. Double-click on a snapshot to open it. You can then simply restore the accidentally deleted files via the Explorer. Fear not: you cannot accidentally delete files in Snapshots, these folders are read-only.
.