Protection

This section will guide you through how to achieve data protection with snapshots. The first two parts will explain how to create protection plans and make use of them, including replication, snapshot restoration, and snapshot clone. The last two parts will explain how to create, edit, and delete schedule/retention policies of protection plans.

Note:

  • The snapshot feature is only supported on virtual machines whose storage is in the Btrfs file system.
  • The snapshot feature is only usable when the storage host of virtual machines is powered on.
  • The snapshot feature is only supported on virtual machines created after DSM 6.1.
  • In order to use a replication plan, the source and the destination of the replication must have volumes in the Btrfs file system.
  • Remote replication requires at least two hosts in the cluster. This feature does not support replication between two volumes on the same host.
  • The maximum number of replication plans in a cluster is 32.
  • When selecting a replication destination, the remaining size of the destination should be at least equal to the allocated size of the virtual machine to be replicated. Snapshot synchronization may fail if space is not sufficient.

Protection Plan

To create a protection plan:

  1. Click Create.
  2. Select one of the two plan types:
    • Local Snapshot: Supports schedule/retention policies on the local host. Snapshots generated by a schedule will be stored on the host which is the storage location of the virtual machine. Replication is not supported.
    • Local Snapshot with Remote Replication: Supports replication and schedule/retention policies on local and remote hosts. Snapshots generated by a schedule will be synchronized to the replication destination. Snapshots will be retained on the source and the destination according to the respective retention policies.
  3. Select virtual machines to create a protection plan for.
  4. According to the selected plan type, you can set up schedule policy on the local host and retention policy on the local or remote host.
  5. If the protection plan includes replication, you need to choose a replication destination and decide whether to sync data immediately after the creation of the protection plan. In advanced settings, you can check Enable transfer encryption to achieve a more secure transmission between the replication source and the replication destination.

To apply an existing protection plan:

  1. Click Create > Apply existing plan.
  2. Follow the instructions in the wizard to complete the settings.

To edit a protection plan:

  1. Select the protection plan that you want to edit.
  2. Click Protection Plan > Manage > Edit.
  3. If the selected protection plan includes replication, you can change its schedule policy, retention policy, and advanced settings. If the replication destination has been changed, snapshot records on the original replication destination will be cleared. You can still use snapshots on the replication source.
  4. If the protection plan type is Local Snapshot, you can enable replication by clicking Replication Destination > Enable replication.

To delete a protection plan:

  1. Select the protection plan that you want to delete.
  2. Click Protection Plan > Manage > Delete.
  3. If the status of protection plan is normal, you can decide whether to keep the data in the replication destination or not.

Note:

  • After keeping the data in the destination, the status of the protection plan will become source missing. You can choose a snapshot and failover it to generate an usable virtual machine.

To pause a protection plan:

  1. Select the protection plan that you want to pause its scheduler.
  2. Click Protection Plan > Manage > Pause Scheduler.

    Note:

    • The Pause Scheduler button is only available when the selected protection plan has a schedule policy.

To resume a protection plan:

  1. Select the protection plan that you want to resume its scheduler.
  2. Click Protection Plan > Manage > Resume Scheduler.

To switchover a replication plan:

If the status of a protection plan is normal, you can perform a switchover and switch the role of the replication source with the replication destination.

  1. Select the protection plan that you want to perform a switchover to.
  2. Click Protection Plan > Manage > Switchover. After the operation is finished, the storage location of the virtual machine will be changed to the original replication destination.

Note:

  • The virtual machine should be powered off during a switchover.
  • New snapshots will be automatically created and synchronized to ensure data consistency.

To failover a replication plan:

If the host is disconnected and the virtual machine cannot be accessed, you can choose one snapshot as the data source and failover to the replication destination.

  1. Select the protection plan that you want to perform a failover to.
  2. Click Protection Plan > Manage > Failover.
  3. Choose one snapshot from the replication destination. After the operation is finished, the storage location of the virtual machine will be changed to the original replication destination.

Note:

  • The virtual machine should be powered off during a failover.
  • There should be at least one snapshot record on the replication destination.
  • If the status of a replication plan is normal, a forced failover will be performed.
  • After a failover has been performed, the settings of the virtual machine will be the same as the settings when the snapshot was taken.

To reprotect a replication plan:

After performing a failover to a replication plan, you can reprotect it without losing any snapshot records on the replication destination.

  1. Select the protection plan that you want to reprotect.
  2. Click Protection Plan > Manage > Reprotect.
  3. Choose a host as the new snapshot source and decide whether to sync data immediately after performing reprotection.
  4. After reprotection has been performed, the virtual machine will run on the new source storage and run replication according to the settings of the original replication plan.

Note:

  • The virtual machine should be powered off during reprotection when the new and current source storage is not the same.
  • Failover must have been performed to the replication plan first before performing reprotection.

Snapshot Action

To take a snapshot of a virtual machine:

  1. Select the protection plan of a virtual machine of which you want to take a snapshot.
  2. Click Snapshot Action > Take a Snapshot.
  3. Enter the Description for the snapshot to be taken.
  4. If the virtual machine has a replication plan, you can choose to synchronize snapshots by clicking Sync to replication destination.
  5. Tick/untick the Lock checkbox to determine whether the snapshot will be automatically removed by retention settings.
  6. Click OK to start taking a snapshot.

Note:

  • Snapshots can only be taken when the virtual machine is already powered on or shut down.
  • It is recommended that you install QEMU Guest Agent to ensure data consistency. If it is not installed or failed to function during taking online snapshots, the result might be inconsistent.
  • Maximum number of snapshots:
    • Pro version: 255
    • Basic version: 32

To browse snapshots of virtual machines:

  1. Select the protection plan of a virtual machine of which you want to browse the snapshots.
  2. Click Snapshot Action > Snapshot List.

To remove snapshots of virtual machines:

  1. Select the protection plan of a virtual machine of which you want to remove the snapshots.
  2. Click Snapshot Action > Snapshot List.
  3. Select one or more snapshots you want to remove, and click Remove. (Press and hold Shift or Ctrl while making multiple selections.)
  4. If the protection plan has replication, you can choose to delete snapshots on the source server or the destination server.
  5. Click OK to confirm the removal.

Note:

  • In order to optimize the performance of replication, the last snapshot used for replication cannot be deleted from the replication destination.

To edit snapshots of virtual machines:

  1. Select the protection plan of a virtual machine of which you want to edit the snapshots.
  2. Click Snapshot Action > Snapshot List.
  3. Select a snapshot you want to edit, and click Edit.
  4. You can modify the description of the snapshot in Description, and tick/untick the Lock checkbox to determine whether the snapshot will be automatically removed by retention settings.
  5. Click OK to save the settings.

To restore a virtual machine:

  1. Select the protection plan of a virtual machine you want to restore.
  2. Click Snapshot Action > Snapshot List.
  3. Select a snapshot version you want to restore from, and click Action > Restore in-place.
  4. You will see a confirmation message. Click OK to confirm the action.

Note:

  • Snapshots can only be used to perform restoration when the virtual machine is shut down.
  • After restoration is performed, the number of CPU cores, memory, network settings and virtual disks will be restored.
  • The name of the virtual machine, autorun settings, and ISO image settings will not be restored.
  • The MAC address will be reset during the process of restoring network settings of the virtual machine. If the virtual switch does not exist, the virtual machine will be disconnected.

To clone a snapshot to a new virtual machine:

  1. Select the protection plan of a virtual machine that you want to clone.
  2. Click Snapshot Action > Snapshot List.
  3. Select a snapshot version you want to clone, and click Clone with a new name.
  4. If the protection plan has replication and the snapshots exist on both hosts, you can choose which storage you want the virtual machine to be created on.
  5. Enter the name of the cloned virtual machine.
  6. Click OK to finish.

To synchronize snapshots to the replication destination:

  1. If the protection plan has replication, you can manually synchronize snapshots from the source to the destination.
  2. Select the protection plan of a virtual machine that you want to clone.
  3. Click Snapshot Action > Snapshot List.
  4. Click Action > Sync to replication destination after choosing the snapshots you want. (Press and hold Shift or Ctrl while making multiple selections.)

Note:

  • Synchronizing snapshots from the destination to the source is not allowed.
  • You can only transfer snapshots that are created after creating a replication plan.
  • The creation time of snapshots that you choose for synchronization cannot be earlier than the newest snapshot record on the replication destination.

Schedule Policy

To create a schedule policy:

  1. Go to Protection > Schedule Policy.
  2. Click Create to open the wizard.
  3. Enter the following schedule information:
    • Name: Specify the name of the policy.
    • Days: Specify the days of the week when snapshots of virtual machines should be taken (e.g., daily, weekends, or every Sunday, etc.).
    • Frequency: Specify how often snapshots should be taken on the chosen days.
    • Starting at: Specify the time when the first snapshot should be taken on the chosen days.
    • Repeat until: Specify the time when the last snapshot should be taken on the chosen days.
  4. Select the protection plans to which you want to apply the schedule policy. Click Next.
  5. Confirm the settings. Click Apply to finish.

To edit a schedule policy:

  1. Go to Protection > Schedule Policy.
  2. Select the schedule policy that you want to edit. Then click Edit.
  3. In Schedule Settings, edit the name or schedule policy.
  4. Switch to the Protection Plan tab.
  5. Select the protection plans to which you want to apply the edited schedule policy.
  6. Click OK to apply the settings.

Note:

  • The names and settings of the default policies cannot be changed.

To delete a schedule policy:

  1. Select the schedule policy that you want to remove, and click Delete. All protection plans under the deleted policy will be set without any schedule policy.
  2. You will see a confirmation message. Click Delete to confirm the removal.

Note:

  • Default policies cannot be deleted.

Retention Policy

To create a retention policy:

  1. Go to Protection > Retention Policy.
  2. Click Create to open the wizard.
  3. Specify the following retention policy information:
    • Keep the latest snapshots: Specify the number of the latest snapshots to be kept. The oldest snapshots will be overwritten by newly taken ones.
    • Keep all snapshots within an hour and others under the following rules: You can configure retention rules for specific time ranges. For more information, please refer to the Retention Policy note.
  4. Select the protection plans to which you want to apply the retention policy on the replication source. Click Next.
  5. Select the protection plans to which you want to apply the retention policy on the replication destination. Click Next.
  6. Confirm the settings. Click Apply to finish.

Note:

  • When the number of snapshots reaches the limit after executing the retention policy, the oldest unlocked snapshot will be deleted first.
  • If the number of snapshots reaches the upper limit and all snapshots are locked, snapshots cannot be taken until you delete or unlock some snapshots.

To edit a retention policy:

  1. Go to Protection > Retention Policy.
  2. Select the retention policy you want to edit. Then click Edit.
  3. In Retention Settings, edit the name or retention policy.
  4. Switch to the Local Snapshot Retention tab or the Replication Retention tab.
  5. Select the protection plans to which you want to apply the edited retention policy.
  6. Click OK to apply the settings.

Note:

  • The names and settings of the default policies cannot be changed.

To delete a retention policy:

  1. Select the retention policy you want to delete and click Delete. All virtual machines under the deleted policy will be set without any protection policy.
  2. You will see a confirmation message. Click Delete to confirm the removal.

Note:

  • Default policies cannot be deleted.

Retention Policy

This option provides an ideal solution to help you specify the maximum amounts of snapshot versions to save your volume space, but you may need to retain your snapshots for longer periods of time.

Synology employs the GFS or Grandfather-Father-Son retention policy. You can configure the maximum amounts of snapshot versions to be retained for the following time ranges respectively: hourly, daily, weekly, monthly, and yearly.

Protection Policy will retain as many as the configured maximum number of snapshots for every time range. If more than one snapshot version exists within a time range, only the earliest one will be kept. For example, if you set a policy as 10 weekly snapshots, Data Protection will retain the earliest snapshot (if more than one snapshot is taken in a week) for each of the latest 10 weeks.

Moreover, all snapshot versions within one hour since the taking of newest snapshot will be kept by default, for your convenience to find and restore from recent snapshot versions. You can also lock a snapshot to prevent it from automatic removal by your retention rules.

Protection Plan
Snapshot Action
Schedule Policy
Retention Policy