This topic describes how to use Hybrid Backup Recovery (HBR) to back up the data of an Apsara File Storage NAS file system. After you back up the data, you can restore the data at the earliest opportunity if the data is lost or damaged.

Prerequisites

A Network File System (NFS) or Server Message Block (SMB) file system is created. For more information, see Create a NAS file system.

Background information

  • Unless otherwise specified, NAS in this topic refers to Apsara File Storage NAS.
  • HBR allows you to back up NFS and SMB file shares regardless of whether NAS file systems are mounted. HBR uses an efficient backup mechanism that scans files in NAS file systems. This eliminates the need to create snapshots for NAS file systems.
  • NAS backup does not support the access control list (ACL) feature of NAS SMB files systems. For more information about the ACL feature, see Use the ACL feature of a NAS SMB file system.
  • If you do not have the required permissions to back up an NAS SMB file system by using HBR, the backup operation fails. In this case, we recommend that you grant HBR the required permissions on an Elastic Compute Service (ECS) instance. For more information, see Grant HBR the permissions to read data from SMB file systems in NAS.
  • You can also back up Apsara File Storage NAS file systems by using a backup client for ECS. For more information, see Overview.

Create a backup plan

Note We recommend that you include no more than 50 million files or 8 million files and subdirectories in each directory for a single backup job.

To back up files in a NAS file system to a backup vault in the same region as the file system, perform the following steps:

  1. Log on to the HBR console.
  2. In the left-side navigation pane, choose Backup > NAS Backup.
  3. In the top navigation bar, select a region.
  4. On the Alibaba NAS tab, click Create Backup Plan in the upper-right corner.
  5. In the Create Backup Plan panel, set the parameters and click OK.
    Note The first time you use HBR, you can apply for a 30-day free trial of backup plans. The free trial period starts from the day when a backup plan is created.
    1. The following table describes the basic parameters.
      Parameter Description
      File System The NAS file system that you want to back up.
      Plan Name The name of the backup plan. If you do not configure this parameter, a random name is specified for the backup plan.
      Start Time The time at which the backup plan starts. The time is accurate to seconds.
      Pay After Trial Ends Specifies whether to pay for the backup plan after the free trial ends. Valid values:
    2. Click Switch to Paid Plan to configure the advanced settings. The following table describes the advanced parameters.
      Parameter Description
      Source Paths The path to the folder that you want to back up, for example, /nas/folder.
      Backup Interval The interval at which incremental backup is performed. Units: days or weeks.
      Retention Policy The retention policy for the backup data. Valid values:
      • Limited (default value): The backup data is retained for a specified period of time. If you select Limited, you must set the Retention Period parameter.
      • Permanent: The backup data is permanently retained.
      Retention Period This parameter is required only if the Retention Policy parameter is set to Limited. This parameter specifies the period of time for which the backup data is retained. By default, the backup data is retained for 1 week. Unit: days, weeks, months, or years.
      Backup Vault The backup vault to which you want to store the backup data. Valid values:
      • Create Vault: If you select this option, specify a name for the vault in the Vault Name field. If you do not configure this parameter, a random name is specified for the backup vault.
      • Select Vault: If you select this option, select a backup vault from the Vault Name drop-down list.
      Notice After a backup vault is created, you are charged for the backup vault regardless of whether backup data is generated. For more information, see Billing methods and billable items
      Vault Name The name of the backup vault.
      Vault Resource Group This parameter is required only if the Backup Vault parameter is set to Create Vault. This parameter specifies the resource group to which the backup vault belongs.

      You can use resource groups to manage resources owned by your Alibaba Cloud account. Resource groups simplify the resource and permission management of your Alibaba Cloud account. For more information, see Create a resource group

      Data Redundancy Type This parameter is required only if the Backup Vault parameter is set to Create Vault. This parameter specifies the type of data redundancy for the backup vault. The data redundancy mechanism improves data reliability of the backup vault.
      • Locally redundant storage

        If LRS is enabled, HBR stores the copies of each object on multiple devices of different facilities in the same zone. This way, HBR ensures data durability and availability even if hardware failures occur.

      • Zone-redundant storage

        If ZRS is enabled, HBR uses the multi-zone mechanism to distribute data across three zones within the same region. If a zone becomes unavailable, the data can still be accessed.

      For more information, see Storage vault types.

      Source Encryption Type This parameter is required only if the Backup Vault parameter is set to Create Vault. This parameter specifies the method that is used to encrypt the data in the backup vault.
      • HBR-managed (default value): You can use the default encryption method of HBR.
      • KMS: You can use Key Management Service (KMS) to encrypt data that is stored in the backup vault. If you select this option, you must specify the KMS KeyId parameter.
      Notice
      • If you enable KMS-based encryption, you cannot modify a KMS key.
      • Before you can use the KMS key to encrypt the data in the backup vault, you must create the key ID in the KMS console. For more information, see Create a CMK
    After you create a backup plan, HBR backs up files in the source NAS file system from the specified start time at the specified interval.

    On the Backup Plans tab, you can perform the following operations:

    • To start a backup job, find the backup plan and click Run Now in the Actions column.
    • To suspend a running backup job, find the backup plan and choose More > Suspend Plan in the Actions column. To resume a suspended backup job, find the backup plan and choose More > Resume Plan in the Actions column.
    • To delete a backup plan, find the backup plan and choose More > Delete Plan in the Actions column. After you delete the backup plan, HBR no longer runs backup jobs for the backup plan but the backup data is retained.
    • To view all backups of a file system or the backups created within the last three months, find the backup plan and choose More > Backups in the Actions column.
    • To modify a backup plan, find the backup plan and click Edit in the Actions column.
    Note You can view the progress of each backup job on the Backup Jobs tab. After a backup job is completed, you can restore the backup data of the source NAS file system to the same or a different NAS file system.

Create a restore job

To restore backup data from a backup vault to a NAS file system in the same region as the backup vault, perform the following steps:

  1. In the upper-right corner of the Restore Jobs tab, click Create Restore Job.
  2. In the Create Restore Job panel, set the following parameters.
    1. Select the backup that you want to restore, and click Next.
      Parameter Description
      Source Vault The backup vault where the backup data that you want to restore is stored.
      Source File System The source NAS file system. Select a NAS file system that has been backed up by using HBR.
      Select a backup to restore The backup that you want to restore. Select a backup from the drop-down list.
    2. In the Select Restore Items step, set the Restore Items parameter and click Next.
      Parameter Description
      Restore Items Select the files or directories that you want to restore. Valid values:
      • Include All Files: HBR restores all backup files from the source NAS file system.
      • Include Files: Select the files or folders that you want to restore. You can also click Enter Paths to specify the files that you want to restore.
      • Exclude Files: Select the files or folders that you do not want to restore. You can also click Enter Paths to specify the files that you do not want to restore.

      Enter one path in each line and make sure that each path starts with the lowest-level directory in the source path. For example, to restore the file.txt file and the abc folder in the /test/data directory, enter the following paths:

      /data/file.txt
      /data/abc
    3. In the Restore Destination step, select a file system in the specified region and click Next.
    4. In the Destination Path step, specify the recovery path and click Create.
      Parameter Description
      Restore Path Type The type of the recovery path.
      • Specify Path: Specify a new path and restore the file system to the path.
      • Origin Path: Restore the file system to the original path.
      Destination Path This parameter is required only if the Restore Path Type parameter is set to Specify Path. The path to which the file system is restored. For example, you can restore the file system to /nas/abc.
    After the restore job is created, you can view the progress of the restore job in the Status column on the Restore Jobs tab.

Create a remote mirror vault for the backup vault

A backup vault is a repository in which HBR stores backup data in the cloud. To implement disaster recovery, you can create a remote mirror vault for a backup vault and back up data from the backup vault to the mirror vault.

To back up data to a mirror vault, perform the following steps:

  1. Log on to the HBR console.
  2. In the left-side navigation panel, click Overview. On the Overview page, select a region, for example, China (Hangzhou). Find the backup vault for which you want to create a mirror vault and click Cross-Region Backup in the upper-right corner of the backup vault section.
    kuadiyu
  3. In the Create Mirror Vault panel, set the following parameters and click Create.
    Note
    • You can create only one mirror vault for each backup vault.
    • You can back up data to a remote mirror vault and restore backup data from the mirror vault. However, you cannot create backup plans for the mirror vault. The historical backup data stored in the source backup vault is synchronized to a mirror vault 90 minutes after the mirror vault is created.
    • When a mirror vault is created, the mirror vault contains all the backup data that is stored in the source backup vault.
    mirror-vault
    Parameter Description
    Region The region where the mirror vault resides.
    Vault Name The name of the mirror vault.
    Data Redundancy Type This parameter is required only if the Backup Vault parameter is set to Create Vault. This parameter specifies the type of data redundancy for the backup vault. The data redundancy mechanism improves data reliability of the backup vault.
    • Locally redundant storage

      If LRS is enabled, HBR stores the copies of each object on multiple devices of different facilities in the same zone. This way, HBR ensures data durability and availability even if hardware failures occur.

    • Zone-redundant storage

      If ZRS is enabled, HBR uses the multi-zone mechanism to distribute data across three zones within the same region. If a zone becomes unavailable, the data can still be accessed.

    For more information, see Storage vault types.

    Description The description of the mirror vault.
    After you create a mirror vault, you can view the progress of data synchronization. After the data is synchronized, you can restore the data in a NAS file system from the mirror vault.

Restore data from a remote mirror vault

A backup vault is a repository in which HBR stores backup data in the cloud. To implement disaster recovery, you can restore data from a remote mirror vault to a NAS file system. Perform the following steps:

  1. On the NAS Backup page, select the region where the mirror vault resides and select a file system.
  2. Click the Restore Jobs tab. In the upper-right corner of the Restore Jobs tab, click Create Restore Job.
  3. In the Select Backup step, set the parameters.
    You must select the mirror vault from the Source Vault drop-down list. The name of a mirror vault is prefixed by [COPY]. For information about how to set other parameters, see Create a restore job. restorejob

What to do next

In the upper-right corner of the NAS Backup page, click Manage Mounts. In the Manage Mounts panel, you can perform the following operations:

  • View all the file systems for which you have created backup plans in the selected region: You can click a file system to view the information of the NAS file system. The information includes the protocol type and the number of mount targets.
  • Unmount a file system: After you create a backup plan for a NAS file system, HBR creates a mount target for the file system. You cannot directly delete the mount target in the NAS console because it is created by using an internal service of Alibaba Cloud. If you want to delete a mount target, find the file system in the Manage Mounts panel and click Unmount in the Actions column. After the mount target is deleted, the backup jobs that are running fail. Before you delete the mount target, make sure that all backup plans are deleted and no backup jobs or restore jobs of the file system are running.