Extreme NAS file systems support the snapshot feature. You can use this feature to restore data across zones. If you want to restore data from a snapshot of a specified point in time to an existing file system, you can create a file system from the snapshot. Then, you can copy the data from the created file system to the existing file system.

Prerequisites

The file system is in the Running state. Otherwise, you cannot create snapshots for the file system.
Note Snapshots for Extreme NAS file systems are in public preview and are provided free of charge.

Usage notes

  • You can manually create a maximum of 128 snapshots for each file system. A maximum of 128 snapshots can be automatically created for each file system.
  • If a snapshot is being created for a file system, you cannot create another snapshot for the file system.
  • If a file system expires when a snapshot is being created for the file system, the file system is released and the snapshot is deleted.
  • When a snapshot is being created for a file system, the performance of the file system may be slightly compromised and the IOPS may be temporarily degraded. We recommend that you do not create snapshots during peak hours.
  • A snapshot is a backup of a file system at a specific point in time. When you create a snapshot for a file system, incremental data of the file system is not synchronized to the snapshot.

Manually create a snapshot

To improve fault tolerance, we recommend that you manually create snapshots.
  • Manually created snapshots are permanently retained in a file system. We recommend that you delete the snapshots that you no longer need on a regular basis to reduce costs.
  • Manually created snapshots are permanently retained only if your account has sufficient balance. If you can no longer use NAS for 15 days due to overdue payments, the snapshots that you manually created are deleted.
  1. Log on to the NAS console.
  2. In the left-side navigation pane, choose Data Service > Snapshot.
  3. On the Snapshot page, click Manually Create Snapshot.
  4. In the Manually Create Snapshot dialog box, set the parameters. The following table describes the parameters.
    Parameter Description
    File System Select the ID of the Extreme NAS file system for which you want to create a snapshot.
    Retention Period Select a retention period based on your business requirements.
    • Custom Duration: Specify the period for which the snapshot is retained. Unit: days. Valid values: 1 to 65536.
    • Permanently retained until the number of snapshots reaches the upper limit: The snapshot that you create is permanently retained. If the number of manually created snapshots exceeds 128, the file system deletes the earliest snapshot.
  5. Click OK.

Create an automatic snapshot policy

You can apply an automatic snapshot policy to an Extreme NAS file system. Snapshots are then automatically created for the Extreme NAS file system at the specified points in time. This way, data is automatically backed up from the Extreme NAS file system and the security of your business data is improved.
  • You can apply an automatic snapshot policy to multiple file systems.
  • If the number of snapshots that are automatically created for a file system reaches 128, the file system deletes the earliest snapshot. Manually created snapshots are not affected.
  • If you modify the retention period in an automatic snapshot policy, the new retention period applies only to new snapshots. The original retention period still applies to the existing snapshots.
  • If a snapshot is being created when the scheduled time for a new snapshot arrives, the creation of the new snapshot is skipped. This occurs if the file system stores a large volume of data.

    For example, you have scheduled snapshots to be automatically created at 09:00:00, 10:00:00, 11:00:00, and 12:00:00. The system starts to create a snapshot at 09:00:00 and does not complete the process until 10:20:00. The process takes 80 minutes because the file system has a large volume of data. In this case, the system does not create a snapshot at 10:00:00, but creates a snapshot at 11:00:00.

  • Snapshots that are automatically created are named in the auto_yyyyMMdd_X format.

    For example, auto_20140418_1 indicates the name of the first snapshot that was automatically created on April 18, 2014. In the preceding format, auto indicates that the snapshot is automatically created rather than manually created. yyyyMMdd indicates the date when the snapshot is automatically created. yyyy stands for the year, MM the month, and dd the day of the month. X indicates the ordinal number of the snapshot.

  1. Log on to the NAS console.
  2. In the left-side navigation pane, choose Data Service > Snapshot.
  3. Create an automatic snapshot policy.
    1. On the Snapshot page, click the Automatic Snapshot Policy tab.
    2. On the Automatic Snapshot Policy tab, click Create Automatic Snapshot Policy.
    3. In the Create Automatic Snapshot Policy dialog box, set the following parameters.
      Parameter Description
      Created At The hours of the day at which snapshots are automatically created. You can select one or more hours from 00:00 to 23:00.
      Note When snapshots are being created for a file system, the IOPS of the file system is temporarily degraded. We recommend that you set off-peak hours to create snapshots.
      Recurring Date The days of the week on which snapshots are automatically created. You can select one or more days from Monday to Sunday.
      Retention Period The retention period of automatically created snapshots. The default retention period is 30 days. The following options are available:
      • Custom Duration: Specify the period for which the snapshots are retained. Unit: days. Valid values: 1 to 65536.
      • Permanently retained until the number of snapshots reaches the upper limit: Automatically created snapshots are permanently retained. If the number of automatically created snapshots reaches 128, the file system deletes the earliest snapshot.
    4. Click OK.
  4. Apply the automatic snapshot policy.
    1. Find the automatic snapshot policy that you want to apply and click Apply to File Systems.
    2. In the File System ID section of the Apply to File Systems dialog box, select one or more file systems and click the > icon to move the file systems to the Apply to File Systems section.
    3. Click OK.
      After you apply an automatic snapshot policy to a file system, NAS automatically creates snapshots for the file system based on the policy.

Use a snapshot to create a file system

You can also use an SDK to create a file system from a snapshot of a specified point in time.
Important If you want to restore data from a snapshot of a specified point in time to an existing file system, you can create a file system from the snapshot. Then, you can copy the data from the created file system to the existing file system.
  1. Install NAS SDK for Python.
    pip install aliyun-python-sdk-core
    pip install aliyun-python-sdk-bssopenapi
    pip install aliyun-python-sdk-nas
  2. Customize the code that is provided in NAS SDK for Python and run the code to create a file system.

    The sample code includes the following required parameters.

    • accessKeyId and accessSecret: Specify the AccessKey ID and AccessKey secret of your Alibaba Cloud account. For more information, see How do I obtain an AccessKey pair?
    • set_parameters: Specify the required parameters for the file system that you want to create.
      Parameter Description
      Region The region to which the snapshot belongs. For example, you can specify cn-shanghai. You can call the DescribeRegions operation to query all available regions.
      Zone The zone in the region to which the snapshot belongs. For example, you can specify cn-shanghai-g. You can call the DescribeZones operation to query all available zones.
      ProtocolType The protocol type of the file system. Extreme NAS file systems support only NFSv3.
      StorageType The storage type of the file system. Valid values:
      • standard: standard
      • advance: advanced
      Capacity The storage capacity of the Extreme NAS file system that you want to create. The value of this parameter must be the same as the storage capacity of the file system for which the snapshot is created.
      SnapshotId The ID of the snapshot.
    #!/usr/bin/env python3
    import json
    
    from aliyunsdkcore.client import AcsClient
    from aliyunsdknas.request.v20170626.CreateFileSystemRequest import CreateFileSystemRequest
    
    def create_file_system():
        client = AcsClient('<accessKeyId>', '<accessSecret>', '<Region>')
        request = CreateFileSystemRequest()
        request.set_accept_format('json')
        request.set_StorageType("standard")
        request.set_ProtocolType("NFS")
        request.set_FileSystemType("extreme")
        request.set_Capacity("100")
        request.set_ZoneId("cn-hangzhou-h")
        request.set_SnapshotId("s-extreme-xxxxxxxxxx")
    
        response = client.do_action_with_exception(request)
        res = json.loads(response)
        print(res)

What to do next

Operation Description
Cancel an automatic snapshot policy To cancel an automatic snapshot policy, perform the following steps:
  1. On the File System List page, find the file system, and choose More > Snapshot > Set Snapshot Policy in the Actions column.
  2. In the Set Snapshot Policy dialog box, turn off Apply Policy and click Cancel to cancel the policy that is applied to the file system.
View a snapshot On the Snapshot tab, view the list of snapshots and the details of each snapshot.
Delete a snapshot On the Snapshot tab, find the snapshot and click Delete in the Actions column.
View automatic snapshot policies On the Automatic Snapshot Policy tab, view the list of automatic snapshot policies and the details of each policy.
View the file systems to which an automatic snapshot policy is applied On the Automatic Snapshot Policy tab, find the automatic snapshot policy and click Apply to File Systems to view the file systems to which the policy is applied.
Modify an automatic snapshot policy On the Automatic Snapshot Policy tab, find the automatic snapshot policy and click Edit Policy in the Actions column.
Delete an automatic snapshot policy On the Automatic Snapshot Policy tab, find the automatic snapshot policy and click Delete in the Actions column.