We use cookies to help us improve our webpage. Please read our Cookie Policy .

NAS 259

Using Remote Sync (Rsync) to backup your data

Learn how to create and execute Rsync backup jobs to a remote ASUSTOR NAS

2024-06-26

COURSE OBJECTIVES

Upon completion of this course you should be able to:

  1. Having a basic understanding of Rsync.
  2. Be able to create and execute an Rsync backup job to a remote ASUSTOR NAS.
  3. Have an understanding of some of the Rsync usage scenarios with ASUSTOR NAS.

PREREQUISITES

Course Prerequisites:

None

Students are expected to have a working knowledge of:

N/A


OUTLINE

1. Introduction to Rsync

2. Using Rsync

2.1 Enabling the Rsync server service on the remote ASUSTOR NAS

2.2 Creating an Rsync backup job on the local ASUSTOR NAS

3. Rsync - Best Practice

3.1 Centralized backup (for multiple sites)

3.2 Offsite backup





1. Introduction to Rsync

Rsync is a network protocol that is used to synchronize files and directories from one location to another. It provides block level replication and is appropriate for use with files and data that are always changing. By providing block level replication, Rsync is able to offer incremental backup. Incremental backup allows for successive backup jobs (after your first backup job) to only copy data that has changed since your last backup job. For example, if you have made some small changes to a 10 MB file, incremental backup will only copy the portions that you have made changes to. By only transferring the differences between two sets of files, Rsync can help you to significantly reduce bandwidth usage.




2. Using Rsync

In the following example, we will take you through the process of using Rsync to backup data from a local ASUSTOR NAS to a different remote ASUSTOR NAS.

ASUSTOR NAS is able to function both as an Rsync server and Rsync client which means you can either use your NAS as a centralized backup server or back up your NAS to another NAS or Rsync compatible server.



2.1 Enabling the Rsync server service on the remote ASUSTOR NAS

In this section we will enable the Rsync Server service and then proceed to create a backup module for storing backup jobs. Please remember that you must enable the Rsync Server service on an ASUSTOR NAS before you are able to use Rsync to back up to it.


STEP 1

  • Select [Services] [Rsync Server].
  • Select [Enable Rsync Server] and then click [Apply].
  • Finally, click on [Add] under the Backup Modules heading.


STEP 2

  • The Add New Backup Module window will now appear. Enter a name for the new module and then click on [Browse] to select the path that the files for this module will be saved to.
  • Click [Finish] once you are done.


STEP 3

  • You should now be able to see the new backup module under the Backup Modules heading.


User authentication is optional for backup modules. Rsync server on ADM does not use ADM user accounts and passwords. To use Rsync with authentication, you’ll need to create Rsync-specific users with their own passwords.

  • Click Manage Users.


  • Click Add.
  • Click OK after entering a username and password.


  • Select a backup module and click Edit.


  • Select Yes to enable authentication. Select users to use this backup module below. Click OK.



2.2 Creating an Rsync backup job on the local ASUSTOR NAS

In this section we will create and execute a backup job to the remote ASUSTOR NAS using a local ASUSTOR NAS.


STEP 1

  • Select [Backup & Restore] [Remote Sync].
  • Click on [Create] under the Remote Sync tab.


STEP 2

  • The Create New Backup Job wizard will now appear. Under [Transfer mode], select [Your NAS -> Another ASUSTOR NAS] and then click [Next].


STEP 3

  • Enter the IP address of the ASUSTOR NAS that you want to back up to in the [Server address] field and then click [Next].
    • You can enter LAN IP, WAN IP or DDNS here.


Note:

  • If the remote Rsync server backup module requires authentication, please enter the Rsync username and password as needed for the Rsync server backup module. If using an ASUSTOR NAS as the remote Rsync server, local ADM accounts cannot be used. Please refer to section 2.1 to know how to manage users for Rsync server backup modules.

  • You can also choose to use encrypted transmission. Should you decide to do this, you will have to enter the SSH connection port as well as the administrator username and password of the remote Rsync server.


STEP 4

  • Select a backup type here.
    • Back up multiple items to a singular location: All chosen source folders will be copied one by one to the destination folder. Multiple folders can be selected.
    • One on one folder backup: All data in the designated destination folder will be synchronized with the data in your source folder. The contents of both folders will be identical.


STEP 5

  • Select the source folders or files that you wish to back up and then click [Next].


  • Select the destination folder that you wish to back up to and then click [Next].

Note: You can see the list of backup modules created by the remote NAS introduced in section 2.1.




  • Select the source folders that you wish to back up.
  • Select multiple 1 on 1 folders for backup in one backup job here. (New to ADM 4.2.1)


  • Select the destination folder that you wish to back up to and then click [Next].

Note: You can see the list of backup modules created by the remote NAS introduced in section 2.1.



STEP 6

  • Select [Back up now] and click [Next].

Note: You can also select [Scheduled backup] to create regular backups. Here you can set the frequency of repeated backups during the backup period. (New to ADM 4.2.1)


STEP 7

  • Enter a name for the backup job into the [Save job as] field and click [Next].


Note: Here you will also see additional checkboxes for a variety of backup options. These options are described as follows:

  • Archive mode (incremental backup): After enabling this feature, successive backup jobs (after your first backup job) will only copy the data that has changed since your last backup job (block level). For example, if you have made some small changes to a 10 MB file, incremental backup will only copy the portions that you have made changes to. This can significantly reduce bandwidth usage.
  • Compress data during the transfer: During backup you can compress the data that is being transferred thereby lowering bandwidth usage.
  • Keep file metadata: When you enable this option, certain file properties (permissions, extensions, attributes, owner, groups, etc.) will be sent along with the file to the destination.
  • Support sparse files replication: You will only need to enable this option when the data that you wish to back up contains sparse files. Normally, you will not have to enable this option.
  • Resume file transfer: When a connection or transfer is interrupted, enable this option to continue transferring files when the connection is restored.
  • Mission Mode: Sometimes backup jobs may be stopped because of various connection problems with a busy server on the other end. ASUSTOR’s Mission Mode option allows you to configure the number of connection attempts and time interval for connection attempts, ensuring for the successful completion of your backup job. This also gives IT administrators a significant amount of flexibility when configuring backup jobs.


Here you will also see additional options if using one on one folder backup.

  • Keep extra files at the destination: Once the copying and synchronization of files is completed, the data at the source and destination should be exactly the same. However, sometimes there are extra files present at the destination. These files are only present at the destination but not at the source. By enabling this option, these extra files will be kept at the destination and will remain untouched.


STEP 8

  • Confirm your settings and then click Finish.



STEP 9

  • Created job should now appear. If backup job is not currently in use, press Back up now to execute task.


  • Click Abort to abort a backup task currently in use.




3. Rsync - Best Practice

In the following examples we will introduce you to a couple of best practice scenarios using Rsync in conjunction with ASUSTOR NAS.


Rsync is a commonly used command in Linux systems. You can refer to the following example to use the Rsync command on Linux devices for backup files to ASUSTOR NAS. Enter "rsync --help" to query more command options.



3.1 Centralized backup (for multiple sites)

ASUSTOR NAS can be used as a centralized backup server for multiple sites. Centralized backup can be executed in the following two ways:


Pull Backup

In "Pull Backup", data from multiple sites are "pulled" onto the centralized backup server (NAS) for backup. The backup jobs are all initialized by the centralized backup server. The centralized backup server is able to schedule backup jobs at different times, thereby avoiding potential congestion and bandwidth issues.



For a Pull backup, you can use an ASUSTOR NAS as the centralized backup server, and create Rsync backup jobs on this ASUSTOR NAS. Please select [Another ASUSTOR NAS -> Your NAS] or [Rsync-compatible server -> Your NAS] for the transfer mode.
Please refer to section 2.1 on how to create backup modules on each remote NAS as well as how to set which folders for backup to this ASUSTOR NAS.



Rsync Server

In "Rsync Server", ASUSTOR NAS acts as a centralized Rsync backup server. The backup jobs are all initialized by their respective sites. The potential disadvantage of this setup is that too many sites initiating backup jobs simultaneously could lead to congestion and bandwidth issues.



For ASUSTOR NAS devices that serve as an Rsync server, please refer to section 2.1 on how to create backup modules to back up the data of another remote NAS. When creating a Rsync backup job on another remote ASUSTOR NAS, please select [Your NAS -> Another ASUSTOR NAS] to select a transfer mode.



3.2 Offsite backup

Data from your NAS can be backed up offsite to a remote site for extra security. You can use the [Remote Sync] function found under the [Backup & Restore] system app to back up your NAS to either another ASUSTOR NAS or an Rsync compatible server. The main purpose of offsite backup is for disaster recovery in the event of environmental disasters, theft, and hard disk or other mechanical failures. With data already backed up offsite, disaster recovery efforts should be uncomplicated and straightforward.




Learn More

Was this article helpful? Yes / No