You’ll learn in this post how to keep your data safe from accidental or malicious deletion or alteration, such as being encrypted by ransomware. There are many ways to get this done, but the easiest and most effective is by saying Synology Snapshot.
This applies only to those with a Synology NAS server, which anyone who seriously cares about, among other things, backing up a large amount of data should have.
Snapshot: Data protection completed
Specifically, backups keep data safe — even in the case of a disaster, theft, or loss if you use remote/online backups. On the other hand, redundancy allows the system to continue functioning even if one or more backup drives fail.
But backups and redundancy generally don’t help in the event of unintended changes caused by human error or malicious acts.
For example, if you accidentally make big edits to an important file, like an Excel spreadsheet or a large Word document, then save the changes. The file is there, but its content is no longer valid. Or even worse, when your computer gets hit with a ransomware attack, and all the files are encrypted.
This is where Snapshot comes into play.
In other words, Snaphot shouldn’t be used as the only way to keep your data safe but the final tool in the toolbox that keeps your digital information intact.
What is Snapshot?
Available in all Synology servers that support the Btrfs file system, which is the case of most servers, Snapshot is part of an add-on app (package) called Snapshot Replication.
Tip: If your server supports ext4 and Btrfs, converting the file system to the latter is a good idea. Btrfs is much more advanced. Unfortunately, there’s no easy way; you must move data to a backup drive, rebuild the storage volume, and copy it back.
It keeps versions, called “snapshots”, of your data — up to 1024 versions, as frequently as every 5 minutes — so you can easily bring a file or a folder backup to a previous stage before an adverse change occurs.
The Replication part is useful — it’s a backup feature that replicates a shared folder to another volume or supported NAS server. However, Replication is unnecessary if you already use another backup method or file sync.
In many ways, Snapshot is similar to Shadow Copy of Microsoft, often available on Windows servers, but, in my experience, it is much easier to use.
How to use Snapshot in a Synology server
Here’s how to use Snapshot to protect a shared folder.
- Install the Snapshot Replication app from the Package Center.
- Run the app and choose Snapshots.
- Select a shared folder, then click on Settings. The rest is self-explanatory, but here is what the three tabs of the Settings section do:
- Schedule: This is where you dictate when and how often the system takes a snapshot of the shared folder, from every five minutes to once a day. The “immutable snapshots” option keeps snapshots immutable (undeleteable) for a set number of days once created.
- Retention: This determines the number of snapshots the system will keep before the old ones are deleted. You can even set smart rules for this, as shown in the screenshot above.
- Advanced: Choose to name the snapshot-based the time it’s created for easy management or make the snapshots visible for easy recovery — they will be visible to all users in a subfolder called #snapshot within the protected shared folder.
A couple of things to note:
- The more snapshots you keep, the more frequently and the longer, the more storage is required. However, generally, the amount of space needed for each shot depends mostly on the changes you’ve made to the shared folder and the files within it compared to a previous version.
- Snapshots are always read-only, meaning the previous versions of your data are never susceptible to any changes, including during a ransomware attack. After the immutable period, if applicable, they only get deleted via the Retention rules or when you turn off the Snapshot for the shared folder.
I’ve used Snapshot since it was first introduced in March 2016, together with DSM 6.0. (It’s an improved version of the Data Protection Manager app, first released with DSM 5.2.)
The app has helped prevent disasters in multiple ransomware incidents, not to mention countless data-related accidents. It’s easily one of the best ways to deal with accidental or malicious data alteration.
If you have a Synology server that uses the Btrfs file system, it’s imperative that you enable the Snapshot for its shared folders today. This, plus the rules for securing your server’s admin account, is the best contingency plan to protect your data against malicious attacks.