All Products
Search
Document Center

ApsaraDB for MyBase:Back up the data of an ApsaraDB MyBase for SQL Server instance

Last Updated:Jul 14, 2023

You can use a backup policy to configure the system to automatically back up your ApsaraDB MyBase for SQL Server instance based on the specified backup cycle. You can also perform a manual backup for your ApsaraDB MyBase for SQL Server instance.

Precautions

  • Backup files do not occupy the storage capacity that you purchased for your ApsaraDB MyBase for SQL Server instance. Each instance is allocated a free quota for backup storage.

  • We recommend that you back up your ApsaraDB MyBase for SQL Server instance during off-peak hours and do not execute DDL statements when a backup is being performed. DDL statements trigger locks on tables. If you execute DDL statements when a backup is being performed, the backup may fail due to table locks.

  • If your ApsaraDB MyBase for SQL Server instance stores a large volume of data, a backup may require a long period of time.

  • Backup files are retained for a specified period of time. Before the specified retention period elapses, we recommend that you download the backup files that you need to your computer.

Configure a backup policy for the system to perform automatic backups

The system automatically backs up your ApsaraDB MyBase for SQL Server instance based on a custom backup policy or the default backup policy.

  1. Log on to the ApsaraDB for MyBase console.

  2. In the upper-left corner of the page, select a region.

  3. In the left-side navigation pane, choose Instances > SQL Server.

  4. Find the instance that you want to manage and click Details in the Actions column.

  5. In the left-side navigation pane, click Backup and Restoration.

  6. On the Backup and Restoration page, click the Backup Settings tab. On this tab, click Edit next to Data Backup Settings.

  7. In the dialog box that appears, configure the parameters described in the following table and click Save.

    Parameter

    Description

    Data Backup Retention (Days)

    The number of days for which you want to retain data backup files. Valid values: 7 to 730. Default value: 7. Unit: days.

    Note

    By default, the log backup retention period is the same as the data backup retention period.

    Backup Cycle

    The cycle based on which you want to perform a backup. You can select one or more days of the week.

    Note

    To ensure data security, we recommend that you select at least two days of the week.

    Backup Method

    The backup method that you want to use. Valid values:

    • Snapshot Backup: A snapshot is a point-in-time copy of your instance that can be used to restore your data to a specific point in time. For more information, see Snapshot backup.

    • Physical Backup: This is the default backup method. The system creates a replica of the data of your ApsaraDB MyBase for SQL Server instance. A long period of time is required to create the replica.

    Note
    • After the Backup Method parameter is set to Snapshot Backup, you cannot change the value of this parameter to Physical Backup.

    • After the Backup Method parameter is set to Snapshot Backup, you can perform a physical backup when you manually back up your instance.

    Backup Time

    The period of time during which you want to perform a backup. Unit: hours.

    Note

    We recommend that you back up your instance during off-peak hours.

    Backup Frequency

    • Same as Data Backup

    • Every 30 Minutes

    Note

    If you select the Snapshot Backup method, this parameter is automatically set to Every 30 Minutes. The value of this parameter cannot be changed.

Perform a manual backup for an ApsaraDB MyBase for SQL Server instance

  1. Log on to the ApsaraDB for MyBase console.

  2. In the upper-left corner of the page, select a region.

  3. In the left-side navigation pane, choose Instances > SQL Server.

  4. Find the instance that you want to manage and click Details in the Actions column.

  5. In the upper-right corner of the page that appears, click Back Up Instance.

    Back up an instance
  6. In the dialog box that appears, configure the parameters described in the following table and click OK.

    Parameter

    Description

    Backup Policy

    • Snapshot Backup: A snapshot is a point-in-time copy of your instance that can be used to restore your data to a specific point in time. For more information, see Snapshot backup.

    • Physical Backup: This is the default backup method. The system creates a replica of the data of your ApsaraDB MyBase for SQL Server instance. A long period of time is required to create the replica.

    Note

    Snapshot Backup is available only if the snapshot backup feature is enabled.

    Select Backup Mode

    • Full Backup: A full backup is immediately performed.

    • Automatic Backup: An automatic backup is immediately performed. The system automatically determines whether the automatic backup is a full backup or an incremental backup.

      Note

      Automatic Backup is available only if the Backup Policy parameter is set to Physical Backup.

    Backup Policy

    This parameter is available only if the Select Backup Mode parameter is set to Full Backup.

    • Instance Backup: The system backs up all data of your instance.

    • Single-Database Backup: The system backs up only the databases that you specify. This parameter is available only if you set the Backup Policy parameter to Physical Backup.

      Note

      If you select Single-Database Backup, the Database section appears. In this section, select the databases that you want to back up from the left-side list, and click the > icon to move the selected databases to the right-side list. If no databases are available, create a database. For more information, see Create a database.

  7. In the upper-right corner of the Backup and Restoration page, click the Tasks icon to view the progress of the backup task.

    Note

    After the backup task is complete, you can download the backup file that is generated on the Backup and Restoration page. You cannot download the backup files of specific instances. For more information, see Download a data backup or a log backup.