NAS Hosting

NAS Hosting

Call us:   +1 (973) 494-8304 (US)

+44 (0)20 33559970 (UK)

Backing up Linux computer to Synology

Quick Overview

Your Synology NAS can be a backup destination for your Linux computer by using any of the following protocols: rsync or FTP, CIFS, NFS or WebDAV, among which the most common is rsync. Automated backup can be performed with a written script; data transfer of the backup can be encrypted to protect your important data with a higher level of security.

This post will guide you step by step on how to back up data on your Linux system to your Synology NAS.


Configure your Synology NAS as the destination server

If you are looking to back up data from your Linux computer to Synology NAS, you need to enable Network Backup Service on the destination server first. To enable this function, please do the following:

Log in to DSM using an account belonging to the administrators group, or assign the application privilege for network backup destination to a user account (at Control Panel > Privileges) and log in with its credentials.

Open Backup & Replication.

Go to Backup Services > Network Backup Destination, and then tick Enable network backup service.

Click Apply.

To set up a DSM user with privileges on your Synology NAS:

Go to Control Panel > Privileges, and allow the Network Backup Destination privilege to the user.

Then go to Control Panel > Shared Folder, select a shared folder, click Edit > Permissions, and then allow privileges to the user. 

 

Back up data from Linux server to Synology NAS

The most frequantly used way to back up data from Linux server to Synology NAS is to use rsync to make mirrored folders. You may need to mount the folder on the Synology NAS to your Linux server using CIFS or NFS mount beforehand. The command will be:

[root@www ~]# rsync -av [source_folder] [destination_folder]
# 1. Make /home/ mirror to /backupdata/home/
[root@www ~]# rsync -av /home /backupdata/

Or, you can simply execute the following command on your Linux computer without having to mount the folder. Note that ##.##.##.## in the example below should be replaced by the IP address of your Synology NAS and NetBackup with the destination shared folder on your NAS, if you want to back up data to shares other than the default folder:

rsync -av home/ admin@##.##.##.##::SynologyHosting/backupdata/

This data backup can also be encrypted by inserting -e ssh into the command:

rsync -av -e ssh home/ admin@##.##.##.##::SynologyHosting/backupdata/

When rsync is running, it will compare the data between your Synology NAS and Linux server, and only modified files will be transferred to save you time. You are also able to make daily backups using a Linux Backup Script.

If you are intertested in hosting your Synology NAS in our secure datacentre please feel free to contact us at any time and we will be happy to help Contact us