All Products
Search
Document Center

File Storage NAS:Snapshots

Last Updated:Dec 01, 2025

A snapshot is a point-in-time backup of an Extreme NAS file system. Snapshots are commonly used for scenarios such as daily data backup, data restoration, failover, and data analytics. To restore data from a snapshot to an existing file system in the same or a different zone, create a new file system from the snapshot and then copy the data from the new file system to the existing one.

Prerequisites

The file system must be in the Running state. Otherwise, you cannot create snapshots for it.

Note

The snapshot feature is available only for advanced Extreme NAS file systems. This feature is in public preview and is provided free of charge. The public preview is not covered by the File Storage NAS Service Level Agreement.

Usage notes

  • A maximum of 128 manual snapshots and 128 automatic snapshots can be created for a file system.

  • You cannot create a new snapshot for a file system while another snapshot is being created for it.

  • If a file system expires during snapshot creation, the file system is released and the in-progress snapshot is deleted.

  • Creating a snapshot may slightly degrade the performance of the file system and temporarily slow down I/O operations. Avoid creating snapshots during peak hours.

  • A snapshot backs up data only at a specific point in time. Data that is changed or added to the file system during the snapshot creation process is not included in the snapshot.

Create a snapshot

Manually create snapshots to improve fault tolerance.

  • Manually created snapshots are retained permanently. To avoid incurring unnecessary charges, you should regularly delete snapshots that you no longer need.

  • Manually created snapshots are retained permanently. However, if your service is suspended for 15 days due to an overdue payment, the snapshots are deleted.

  1. Log on to the NAS console.

  2. In the left-side navigation pane, choose Data Service > Snapshot.

  3. In the top navigation bar, select the resource group and region where your file system resides.image

  4. On the Snapshot page, click Manually Create Snapshot.

  5. In the Manually Create Snapshot dialog box, configure the parameters. The following table describes the key parameters.

    Parameter

    Description

    File System

    Select the advanced Extreme NAS file system for which you want to create a snapshot.

    Retention Period

    Select a retention period as needed.

    • Custom Duration: The retention period can range from 1 to 65,536 days.

    • Permanently retained until the number of snapshots reaches the upper limit: The created snapshot is retained permanently. When the number of manual snapshots exceeds 128, the earliest manual snapshot is automatically deleted.

  6. Click OK.

Create an automatic snapshot policy

Apply an automatic snapshot policy to an advanced Extreme NAS file system. The system then automatically creates snapshots for the file system at specified time points. This automatic backup process helps you easily back up data and improves the security and reliability of your business data.

  • An automatic snapshot policy can be applied to multiple file systems.

  • If the number of automatic snapshots for a file system reaches 128, the earliest automatic snapshot is automatically deleted.

  • If you change the retention period of an automatic snapshot policy, the new retention period applies only to new snapshots. The original retention period still applies to existing snapshots.

  • If a file system contains a large amount of data, the time required to create an automatic snapshot may be longer than the interval between two scheduled time points. In this case, the snapshot for the next scheduled time point is skipped.

    For example, you schedule automatic snapshots to be created at 09:00, 10:00, 11:00, and 12:00. The system starts to create a snapshot at 09:00 and completes the process at 10:20. The process takes 80 minutes because the file system has a large amount of data. In this case, the system skips the 10:00 time point and creates the next automatic snapshot at 11:00.

  • Automatic snapshots are named in the auto_yyyyMMdd_X format.

    • auto: indicates an automatic snapshot.

    • yyyyMMdd: indicates the date on which the snapshot is created. yyyy indicates the year, MM indicates the month, and dd indicates the day.

    • X: indicates the sequence number of the automatic snapshot created on that day.

    For example, auto_20140418_1 indicates the first automatic snapshot created on April 18, 2014.

  1. Log on to the NAS console.

  2. In the left-side navigation pane, choose Data Service > Snapshot.

  3. In the top navigation bar, select the resource group and region where your file system resides.image

  4. 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, configure the parameters. The following table describes the key parameters.

      Parameter

      Description

      Created At

      The time points of a day at which automatic snapshots are created. Select one or more hours from 00:00 to 23:00.

      Note

      Creating a snapshot temporarily degrades the I/O performance of the file system. Create snapshots during off-peak hours.

      Recurring Date

      The days of the week on which automatic snapshots are created. Select one or more days from Monday to Sunday.

      Retention Period

      The retention period of automatic snapshots. The default retention period is 30 days. The following options are supported:

      • Custom Duration: The retention period can range from 1 to 65,536 days.

      • Permanently retained until the number of snapshots reaches the upper limit: The created automatic snapshots are retained permanently. When the number of automatic snapshots reaches 128, the earliest automatic snapshot is deleted.

    4. Click OK.

  5. Apply the automatic snapshot policy.

    1. Find the automatic snapshot policy and click Apply to File Systems.

    2. In the Apply to File Systems dialog box, select a file system from the File System ID section and click > to add it to the Apply To File Systems section.

    3. Click OK.

      After the policy is applied to the file system, automatic snapshots are created for the file system based on the policy.

Use a snapshot to create a file system

Create a new file system from a point-in-time snapshot. The data in the new file system is identical to the data that was in the original file system when the snapshot was created. This lets you quickly replicate file systems for different scenarios. This section describes how to use the Python SDK to create a new file system from a snapshot.

Important

To restore data from a point-in-time snapshot to an existing file system, you must create a new file system from the snapshot to serve as a data transfer point. Then copy the data from the new file system to the existing file system.

  1. Install the Python SDK.

    pip install alibabacloud_nas20170626==3.1.3
    pip install alibabacloud_tea_openapi
    pip install alibabacloud_tea_util
  2. Run the code to create a file system.

    Note

    Before you call the API operation, you must configure environment variables for your access credentials. For more information, see Configure environment variables on Linux, macOS, and Windows.

    # -*- coding: utf-8 -*-
    import os
    import sys
    
    from typing import List
    
    from alibabacloud_nas20170626.client import Client as NAS20170626Client
    from alibabacloud_credentials.client import Client as CredentialClient
    from alibabacloud_tea_openapi import models as open_api_models
    from alibabacloud_nas20170626 import models as nas20170626_models
    from alibabacloud_tea_util import models as util_models
    from alibabacloud_tea_util.client import Client as UtilClient
    
    
    class Sample:
        def __init__(self):
            pass
    
        @staticmethod
        def create_client() -> NAS20170626Client:
            """
            Use credentials to initialize the client.
            @return: Client
            @throws Exception
            """
            # We recommend that you use the default credential. For information about other credential types, see https://www.alibabacloud.com/help/en/alibaba-cloud-sdk-262060/latest/configure-credentials-378659.
            credential = CredentialClient()
            config = open_api_models.Config(
                credential=credential
            )
            # For more information, see https://api.alibabacloud.com/product/NAS.
            config.endpoint = f'nas.cn-hangzhou.aliyuncs.com'
            return NAS20170626Client(config)
    
        @staticmethod
        def main(
            args: List[str],
        ) -> None:
            client = Sample.create_client()
            create_file_system_request = nas20170626_models.CreateFileSystemRequest(
                file_system_type='extreme',
                charge_type='PayAsYouGo',
                capacity=100,
                storage_type='advance',
                zone_id='cn-hangzhou-k',
                protocol_type='NFS',
                snapshot_id='s-extreme-00******m'
            )
            runtime = util_models.RuntimeOptions()
            try:
                # To run the code, copy it and print the return value of the API operation.
                client.create_file_system_with_options(create_file_system_request, runtime)
            except Exception as error:
                # This is only an example of how to print the error. Handle exceptions with care. Do not ignore exceptions in your projects.
                # Error message
                print(error.message)
                # For troubleshooting, visit the following URL:
                print(error.data.get("Recommend"))
                UtilClient.assert_as_string(error.message)
    
        @staticmethod
        async def main_async(
            args: List[str],
        ) -> None:
            client = Sample.create_client()
            create_file_system_request = nas20170626_models.CreateFileSystemRequest(
                file_system_type='extreme',
                charge_type='PayAsYouGo',
                capacity=100,
                storage_type='advance',
                zone_id='cn-hangzhou-k',
                protocol_type='NFS',
                snapshot_id='s-extreme-00******m'
            )
            runtime = util_models.RuntimeOptions()
            try:
                # To run the code, copy it and print the return value of the API operation.
                await client.create_file_system_with_options_async(create_file_system_request, runtime)
            except Exception as error:
                # This is only an example of how to print the error. Handle exceptions with care. Do not ignore exceptions in your projects.
                # Error message
                print(error.message)
                # For troubleshooting, visit the following URL:
                print(error.data.get("Recommend"))
                UtilClient.assert_as_string(error.message)
    
    
    if __name__ == '__main__':
        Sample.main(sys.argv[1:])

    The following table describes the key parameters. For more information, see CreateFileSystem.

    Parameter

    Description

    StorageType

    The storage type of the file system. Set the value to `advance`, which indicates the Advanced edition.

    For example, if you create a snapshot named B_Snapshot for an advanced file system and then use B_Snapshot to create a new file system, you must set StorageType to advance.

    ProtocolType

    The protocol supported by the file system. Extreme NAS file systems support only NFSv3.

    Capacity

    The storage capacity of the Extreme NAS file system. The value must be the same as that of the file system from which the snapshot was created.

    For example, if you create a snapshot named A_Snapshot for an advanced Extreme NAS file system with a capacity of 100 GiB and then use A_Snapshot to create a new file system, you must set Capacity to 100.

    ZoneId

    The zone in the region where the snapshot is located. Example: cn-hangzhou-g. Call the DescribeZones operation to query zone information.

    SnapshotId

    The ID of the snapshot.

Related operations

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 destination file system, and choose > Snapshot > Set Snapshot Policy.

  2. In the Set Snapshot Policy dialog box, turn off the Apply Policy switch, and then click OK to cancel the automatic snapshot policy.

View snapshots

On the Snapshot tab, view all created snapshots and their information.

Delete a snapshot

On the Snapshot tab, find the destination snapshot and click Delete to delete the snapshot.

Warning

Data cannot be restored after a snapshot is deleted. If you use a deleted snapshot to create a file system, the file system fails to be created.

View snapshot policies

On the Automatic Snapshot Policy tab, view all created snapshot policies and their information.

View the list of file systems to which a snapshot policy is applied

On the Automatic Snapshot Policy tab, find the destination snapshot policy and click Apply to File Systems to view the file systems to which the policy is applied.

Modify a snapshot policy

On the Automatic Snapshot Policy tab, find the destination snapshot policy and click Edit Policy to modify the snapshot policy.

Delete a snapshot policy

On the Automatic Snapshot Policy tab, find the destination snapshot policy and click Delete to delete the snapshot policy.

References

To roll back a file system to a specific point in time, see ResetFileSystem - Roll back a file system to a specific point in time.