Backup Up Your Synology NAS

by Ray Newbery

Synology and other NAS (Network Attached Storage) devices are often used for backups. But they are also used for file storage, and those files need to be backed up. Just because Synology uses RAID to provide resilient storage doesn’t mean files are perfectly safe. Disk Station Manager (DSM) includes several ways to back up the files on your NAS.

Backups have changed over time but these days they are all managed through the appropriately named Backup & Replication. There are two main backup methods, a traditional Backup and Shared Folder Sync.

Backup can do either a data backup, or if you have iSCSI LUNs installed it can do a LUN backup and backup the entire LUN.

A LUN backup can use either an attached external disk, a local share, or a Synology NAS on the network as its backup destination.

A Data Backup can also backup to a attached external disk, a local share or another Synology NAS on the network. In addition it can also backup to a rsync-compatible server or a supported Public Cloud Service. Supported Cloud destinations are Amazon S3, Microsoft Azure, CHT Hicloud and a SFR Stockage server (a service in France). While I have used Amazon S3 for other backups I don’t use it with Synology since there’s no way to set an encryption key to encrypt the data before it leaves the NAS. The other public cloud destinations don’t support setting an encryption key either. In my opinion this is a serious enough deficiency to keep me from using them.

One potential drawback of the built-in Synology Backup is that many packages are not backed up. If they use files from the file system those files will be backed up and there’s not a problem. But some packages used a database or have significant configuration information which is not backed up.

Packages which are available through the DSM Package manager and are integrated with Synology Backup include:

  • Asterisk - This service will be stopped while it is backed up.
  • CardDAV Server
  • Directory Server - This service will be stopped while it is backed up.
  • DNS Server
  • Mail Server
  • MariaDB - This service will be stopped while it is backed up.
  • Note Station - This service will be stopped while it is backed up.
  • Photo Station
  • Proxy Server
  • RADIUS Server
  • Surveillance Station - This service will be stopped while it is backed up.
  • VPN Server

Notable packages which are not backed up include Audio Station and Video Station. While the music and video files themselves can be backed up, any playlists, meta data, and listening/viewing history will be lost and must be recreated.

You can get right down to the folder level when choosing what folders you want to backup. You can’t get down to to file level and you can’t exclude by file type. For example, you can’t exclude *.bak files. I recommend you backup up entire shares rather than trying to micro-manage the backups and possibly miss some important files.

If the application is one of the ones I previously listed as being supported by backup then you can select it for backup. Be sure you’re also backing up any file shares that the application uses. Selecting the application for backup will not automatically select it’s shares or other data that is part of the regular file system.

For Photo Station you can optionally backup thumbnails. Backing them up takes more space but means they won’t need to be regenerated when you do a restore which could be both time and resource consuming.

Data Backup will save past copies of files so you can restore them if needed.

Backup rotation options

Backup rotation options

You can select the number of versions to keep. You can also just keep every version until the target number is reached, or you can use Smart Recycle.

Smart Recycle keeps hourly versions for 24 hours. Then in keeps daily versions for a month. After a month it keeps weekly versions. The backup needs to run for there to be a version. For example, my backup is scheduled to run once a day, so I have only one hourly version for each day.

Shared Folder Sync is a accurate name for this feature. It will Sync the shared folder(s) of one Synology NAS to another. You can selectively select which shares to sync, but if selected the entire share is synced.

The share is created on the destination NAS. If a share with the same name exists it will be replaced. This is a one way sync, you cannot update a share on each NAS and have the changes replicate to each other.

The sync schedule has a Run sync on modification option which is a nice way to quickly back up files. I have encountered problems with this when I’ve had a file open and the sync couldn’t copy it. It isn’t common but it does happen, and although this generated an error although it did eventually sync the file once I closed it. This isn’t unique to sync on modification and will happen with syncs scheduled by time if a file is open. It’s just that sync on modification is designed to happen when you are actively working on files so it can occur more frequently.

Backup and Replication (a.k.a. Synchronization) is a nice feature which I like and use a lot. Like any backup, you need something to backup to. A second Synology NAS is ideal for synchronization since it can keep that second NAS ready to takeover with minimal loss of files. Of course, that’s only files and not the applications themselves.

Backup allows you to use none-Synology targets such as an attached hard drive. You can also use an rsync-compatible server or a public cloud service. While not as immediate as synchronization this does allow a more complete backup & restore of selected packages. You can also go back and restore older version of files, which is nice.

A Synology NAS is often used to store our most important files. These need to be backed up and DSM has the tools built-in to do it.