All Products
Search
Document Center

File Storage NAS:Back up files from a General-purpose NAS file system

Last Updated:Nov 01, 2024

To prevent data loss or damage, we recommend that you use Cloud Backup to back up all directories and files in your General-purpose NAS file system on a regular basis. Cloud Backup allows you to configure flexible backup policies to back up data to the cloud. You can view and restore data at any time. This topic describes how to use Cloud Backup to back up files from a General-purpose NAS file system.

Prerequisites

  • A General-purpose NAS file system is created. For more information, see Create a file system.

  • Cloud Backup is activated and the AliyunServiceRoleForHbrNasBackup service-linked role is assigned to Cloud Backup.

    If you use the file backup feature for the first time, you must activate Cloud Backup and assign the AliyunServiceRoleForHbrNasBackup service-linked role to Cloud Backup.

Background information

File Storage NAS (NAS) can work with Cloud Backup. Cloud Backup uses an efficient backup mechanism that scans files in General-purpose NAS file systems. This eliminates the need to create snapshots for NAS file systems. You can configure backup policies to generate multiple replicas of data. If data is lost or damaged, you can use these replicas to restore files at the earliest opportunity.

  • You can back up General-purpose Network File System (NFS) and Server Message Block (SMB) file shares regardless of whether the file systems are mounted.

  • Cloud Backup does not support the access control list (ACL) feature of SMB file systems. If the ACL feature is enabled for your SMB file system, Cloud Backup cannot back up the ACL configurations. For more information, see Overview of the SMB ACL feature.

  • If you do not have the required permissions to back up an SMB file system by using Cloud Backup, the backup operation fails. In this case, we recommend that you back up the SMB file system by using a Cloud Backup client for Elastic Compute Service (ECS) file backup. For more information, see Grant the Cloud Backup client the permissions to read data from an SMB file system in NAS and Back up SMB file systems by using backup clients for ECS.

  • You can also enable the recycle bin feature. If you enable the recycle bin feature, the files or directories that you delete are dumped to the recycle bin. The files or directories are permanently deleted from the recycle bin after a specified retention period. You can restore the files or directories from the recycle bin within the retention period that you specify. For more information, see Recycle bin.

Billing

The first time you back up files in a NAS file system, you can create a free (30-day period) backup plan. When the trial period expires, you can renew or suspend the backup plan. For more information, see Billing methods and billable items.

Usage notes

  • The first time you create a backup plan or associate a backup plan with a backup policy, Cloud Backup automatically creates a service-linked role named AliyunServiceRoleForHbrNasBackup to obtain the permissions to access related resources. In the dialog box that appears, assign the role as prompted. For more information, see Service-linked roles for Cloud Backup.

  • In NAS backup and restoration, the maximum length of a file name is 248 bytes. If the length of a file name exceeds 248 bytes, the file fails to be backed up or restored and the backup or restore job is partially completed.

  • When you restore NAS files, you cannot restore socket files or hard links.

Back up files

  1. Log on to the NAS console

  2. In the left-side navigation pane, choose Data Service > File Backup (Cloud Backup Service).

  3. In the top navigation bar, select a region.

  4. On the File Backup page, click the Backup Plans tab and click Create Backup Plan.

  5. In the Create Backup Plan panel, configure the following parameters to create a backup plan, and then click OK.

    1. Configure basic settings.

      Parameter

      Description

      File System

      Select the NAS file system that you want to back up.

      Pay After Trial Ends

      Specify whether to pay for the backup plan after the free trial ends.

      Plan Name

      Enter a name for the backup plan. If you do not configure this parameter, a random name is specified.

      Start Time

      Specify the time at which the backup plan starts. The time is accurate to seconds.

    2. Optional. To configure a fine-grained backup plan, click Switch to Paid Plan to enable advanced settings, and then configure the parameters. The following table describes the parameters.

      Parameter

      Description

      Source Paths

      Enter a file path, for example, /nas/folder.

      Backup Rule

      Configure the rule based on which files are backed up. Only files that match the specified rule are backed up.

      • Include All Files: All files are backed up.

      • Include Files or Exclude Files: If you select Include Files, enter the paths to the files that you want to back up. If you select Exclude Files, enter the paths to the files that you do not want to back up.

      Backup Policy

      Select a proper backup policy from the drop-down list.

      Cloud Backup automatically backs up data sources based on the backup policy that you configure. Backup policies help you flexibly manage data sources. A backup policy includes the following settings: backup vault encryption method, backup interval, retention period, cross-region replication policy, automatic archiving of backup data, and virus detection for backup points.

      If the default backup policy does not meet your requirements, you can click Manage Policy to go to the Policy Center page to create or modify a backup policy.

      For more information about the parameters in a backup policy, see Manage backup policies.

      Note
      • On the Backup Jobs tab, you can view the status of the backup jobs, the data size of the backup files, and other details.

      • If the status of the backup jobs is not updated for a long time, you can click the Refresh button in the upper-right corner of the page.

Restore files

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. Log on to the NAS console

  2. In the left-side navigation pane, choose Data Service > File Backup (Cloud Backup Service).

  3. In the top navigation bar, select a region.

  4. On the File Backup page, click the Restore Jobs tab, and then click Create Restore Job.

  5. In the Create Restore Job panel, perform the following steps.

    1. Select the backup that you want to restore, and click Next.

      Parameter

      Description

      Source Vault

      Select the backup vault that stores the backup data of the source NAS file system.

      Source File System

      Select a NAS file system that has been backed up by using Cloud Backup.

      Backup

      Select the backup that you want to restore.

    2. In the Select Restore Items step, configure 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: Cloud Backup 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

      Select 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 you set the Restore Path Type parameter to Specify Path. This parameter specifies the path to which the file system is restored. For example, you can restore the file system to /nas/abc.

      File Conflict Policy

      • Skip This File

      • Overwrite The File

      • Keep Latest File

      Virus Detection During Restoration

      If you turn on this switch, Cloud Backup performs virus detection on all files to be restored before data restoration. The console provides the detailed information about this feature. For more information, see Backup point virus detection.

      When Recovery Items Contain Detected Viruses

      • Do not restore the virus-infected files (You can find secure versions on the Virus Detection tab.)

      • I am aware of the risks and still want to restore all the selected items

    After the restore job is created, you can view the progress of the restore job in the Status column on the Restore Jobs tab.

Related operations

Category

Description

Operations related to backup plans

  • Modify a backup plan: You can reset the backup interval, retention policy, and source path of the backup plan based on your business requirements.

  • Delete a backup plan: If you no longer need a backup plan, you can delete it. After you delete the backup plan, Cloud Backup no longer runs backup jobs for the backup plan but retains the backup data.

  • Suspend a backup plan: You can suspend a scheduled backup plan. To resume a suspended backup plan, find the backup plan and choose More > Resume Plan in the Actions column.

  • View backup history: You can view all the backup records of the file system or the backup records in the last three months.

Operations related to backup jobs

  • Query a backup job: You can query the details of all backup jobs in the last three months. The details include the job status, data size, and progress.

  • Cancel a backup job: You can cancel a pending or running backup job. If you cancel the backup job, all the files backed up by the job are removed from the backup vault. If you still need to back up the files, run the backup job again.

Operations related to restore jobs

  • Query a restore job: You can query the status, data size, and progress of restore jobs.

  • Cancel a restore job: You can cancel a running restore job. After you cancel a restore job, the restored files of the job are saved in a specified directory. The remaining files of the job are no longer restored.

Delete the mount target that is created by Cloud Backup

When you create a backup plan for a NAS file system, Cloud Backup automatically creates a mount target for the NAS 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.

FAQ

References