How to use SnapSync for backup and disaster recovery?


Last modified date: 2023-02-23

Applicable Products

QuTS hero h5.0.1 (or later)


This tutorial provides a step-by-step demonstration of how you can use SnapSync as a backup and disaster recovery solution.


About SnapSync

SnapSync is a disaster recovery solution that enables you to back up data from one QNAP NAS to another using block-level replication in real time. This means that whenever data is written to the source NAS, it is also immediately written to the destination NAS. This reduces the backup time and lowers the risk of data loss.

SnapSync uses AES-256 encryption to ensure the data is secure during transmission.


Setup Requirements

In this tutorial, we illustrate how to create a real-time SnapSync job between two NAS devices running QuTS hero.

The following conditions are required:

  • For this tutorial, the source and destination NAS devices run on the same QuTS hero version.
    Note
    • If the SnapSync versions are incompatible between the two NAS devices, you will be prompted to update the OS on one or both devices.
    • SnapSync jobs can also be created between two NAS devices running QES, or between one NAS running QuTS hero and one NAS running QES.
      For details on OS compatibility, see the SnapSync section in the QuTS hero User Guide.
  • The destination NAS has the same user accounts that exist on the source NAS.
    Note
    This allows you to set identical user permissions for the folders on both NAS devices, so that you will not encounter user permission issues after replacing the source NAS with the destination NAS.
  • The network connection between the two NAS devices must not use port forwarding or NAT virtual servers.
  • If the two NAS devices are on different WANs, then they must be connected using a site-to-site VPN tunnel.

In the following instructions, we use the shared folder "Test" as the SnapSync job source. The shared folder has the following subfolders and structure:

  • Test
    • Test_1
      • Test_1_1
    • Test_2

After configuring a real-time SnapSync job, we demonstrate how to configure identical shared folder permissions on both NAS devices, and lastly how to replace the source NAS with the destination NAS.


Creating a Real-Time SnapSync Job

  1. Log in to the source NAS.
  2. Go to Storage & Snapshots > Snapshot Backup > SnapSync.
  3. Enable SnapSync service.
  4. Click Create a SnapSync Job.
    The Create a SnapSync Job wizard opens.
  5. Click Sync to Remote.
  6. Specify a job name.
    Note
    The name cannot contain any of the following special characters: ` * = + [ ] \ | ; : ' " , < > / ? %
  7. Select the source storage pool.
  8. Select a shared folder.
    For this tutorial, we select the shared folder "Test".
    Note
    Shared folders and LUNs created via Instant Clone cannot be used as a source for SnapSync jobs.
  9. Click Next.
  10. Select the destination remote NAS.
  11. Optional: Specify the remote SnapSync port number.
    Note
    The default is 8080.
  12. Optional: Enable HTTPS encryption.
  13. Specify an administrator account and password of the remote NAS.
    Important
    For security reasons, QNAP does not recommend using the "admin" account.
  14. Click Connect.
    Important
    If prompted, complete 2-step verification. This is required if the destination NAS has enabled 2-step verification.
  15. After a successful connection, select Real-time for the backup frequency.
  16. Select the destination storage pool.
  17. Create a new shared folder with the same name as the source shared folder.
    Important
    The source and destination shared folders must have the same name. If they are different, the destination NAS will not be able to replace the source NAS.
    For this tutorial, the shared folder name is "Test".
  18. Optional: Configure job options.
    SettingDescription
    CompressionsSnapSync compresses the data before sending it to the destination. The destination NAS decompresses the data before saving it to disk. Enabling this setting can reduce transfer times if your NAS or the remote NAS has a slow network connection, or the two NAS devices are connecting via WAN.
    DeduplicationSnapSync reduces the amount of storage and bandwidth needed by eliminating duplicate copies of repeated data.
    EncryptionSnapSync encrypts the data during transmission to the destination NAS. The data is then decrypted before being stored at the destination.
    Support application consistent snapshotsSnapSync creates application consistent snapshots.
    Note
    This option is only available for VMware vCenter and Volume Shadow Copy Service (VSS) aware applications running on a Windows server. You must install QNAP Snapshot Agent on the iSCSI initiator.
  19. Click Next.
  20. Set the source and destination network adapters for this job.
    Adapter SettingDescription
    Auto-Select Network AdapterThe system automatically selects the fastest network adapters at the source and destination for this job.
    If either network adapter becomes disconnected, the system will select the fastest available adapter.
    Manual-Select Network AdapterManually select the network adapters at the source and destination for this job. You can also select failover adapters, which the job uses if the either primary adapter becomes disconnected.
    Note
    The adapter lists are automatically filtered to only display adapters that can connect to the currently selected adapter.
  21. Click Next.
  22. Configure the latency monitor.
    Note
    • This setting is only available for real-time SnapSync jobs.
    • Latency Monitor monitors the latency of the SnapSync job to ensure the job is running normally. If the job latency goes over the threshold six times within a minute, the system issues a warning notification.
    1. Enable Latency threshold.
    2. Set a threshold value, in milliseconds. The value must be 1–5000.
      Tip
      To determine the threshold value, run a SnapSync performance test by clicking Create a Performance Test. To view the average latency in previous performance tests, click Performance Report.
  23. Click Next.
  24. Review the SnapSync job details.
  25. Click Create.
    The system creates the real-time SnapSync job and replicates the shared folder to the destination NAS.
    The new SnapSync job appears in Storage & Snapshots > Snapshot Backup > SnapSync.
  26. Verify the new shared folder has been created on the destination NAS.
    1. Log in to the destination NAS.
    2. Go to Storage & Snapshots > Storage > Storage/Snapshots.
    3. Click the destination storage pool.
      The new shared folder should appear under the storage pool.
      Note
      To prevent accidental changes, the destination shared folder is set to read-only until the SnapSync connection is removed.

After creating the SnapSync job, we need to configure the access privileges for the replicated shared folder on the destination NAS, so that they match the access privilege settings for the shared folder on the source NAS.


Configuring Identical Users and Shared Folder Permissions

Although SnapSync is able to replicate a shared folder from the source NAS to the destination NAS, it cannot replicate the user permissions associated with the shared folder. This is true even if both the source and destination NAS devices have joined the same AD domain.

Users must replicate the shared folder permissions manually if they want the destination NAS to be able to replace the source NAS when disaster occurs.

  1. Ensure the user accounts on the source NAS also exist on the destination NAS.
    1. Log in to the source NAS.
    2. Go to Control Panel > Privilege > Users.
    3. Log in to the destination NAS.
    4. Go to Control Panel > Privilege > Users.
    5. Compare the two user lists.
    6. Optional: On the destination NAS, click Create and select a method to add accounts that appear on the source NAS but not on the destination NAS.
      Note
      For the purpose of this tutorial, we only need the user accounts "admin", "user1", and "user2".
  2. Note the user permissions for the shared folder on the source NAS.
    1. On the source NAS, go to Control Panel > Privilege > Shared Folders.
    2. Locate the shared folder.
      For this tutorial, the shared folder is "Test".
    3. Under Action, click the Edit Shared Folder Permission icon.
      The Edit Shared Folder Permission window opens.
    4. Go to Users and groups permission.
    5. Note the individual permissions for each user.
    6. For each subfolder, click the subfolder and note the user permissions.
      Note
      For this tutorial, the user permissions for the folder "Test" and its subfolders are as follows:
      FolderPermissions
      Test
      • admin: Read/Write
      • user1: Read/Write
      • user2: Read/Write
      Test_1
      • admin: Read/Write
      • user1: Read/Write
      • user2: Deny Access
      Test_1_1
      • admin: Read/Write
      • user1: Read Only
      • user2: Deny Access
      Test_2
      • admin: Read/Write
      • user1: Deny Access
      • user2: Read/Write
    7. Click Close.
  3. Replicate the user permissions for the same folder and subfolders on the destination NAS.
    1. On the destination NAS, go to Control Panel > Privilege > Shared Folders.
    2. Locate the shared folder.
    3. Under Action, click the Edit Shared Folder Permission icon.
      The Edit Shared Folder Permission window opens.
    4. Go to Users and groups permission.
    5. Optional: Click Add Users to add any missing users found in the source shared folder user permission list.
      The Add Users window opens.
    6. Configure the same user permissions for the shared folder and all subfolders as on the source NAS.
      To follow the example for this tutorial, see the table in step 2f for details.
    7. Click Apply.
      The system saves the settings.

The disaster recovery setup is now complete.

If disaster occurs on the source NAS, you can now replace the source NAS with the destination NAS.


Replacing the Source NAS with the Destination NAS after Disaster

If any errors or any disaster occurs on the source NAS such that data on the source NAS is no longer accessible, you can replace the source NAS with the destination NAS and continue accessing the SnapSync data.

You will need to remove the SnapSync job and then configure the network settings on the destination NAS to be identical to the network settings on the source NAS.

  1. Verify there is no longer a connection between the source and destination NAS devices.
    1. Log in to the destination NAS.
    2. Go to Storage & Snapshots > Snapshot Backup > SnapSync.
    3. Identify the SnapSync job created from the source NAS.
    4. The Job Status should show "Connection failed".
    5. If the job status is normal but you still want to replace the source NAS with the destination NAS, click the Stop icon under Action.
  2. Click the Delete icon to delete the SnapSync job.
    A confirmation window appears.
  3. Click OK.
  4. Ensure the source NAS is no longer connected to the network.
    Note
    To ensure the destination NAS can use the network settings of the source NAS, the source NAS must no longer be connected to the network, or else an IP conflict will occur. If the source NAS is accessible, you can also change the network settings on the source NAS first.
  5. Configure the network settings on the destination NAS.
    1. Go to Network & Virtual Switch > Network > Interfaces.
    2. Identify the main interface connection.
    3. Click the More icon and select Configure.
      The Configure window opens.
    4. Configure the same IP address settings that were previously used for the main interface connection on the source NAS.
    5. Click Apply.

You can now connect to the destination NAS and access the SnapSync data as you previously did with the source NAS.

Was this article helpful?

71% of people think it helps.
Thank you for your feedback.

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less

      Choose Your Country or Region

      back to top