• Document Database Service

dds
  1. Help Center
  2. Document Database Service
  3. User Guide
  4. Managing DDS DB Instances
  5. Backup and Restore
  6. Setting Automated Backup Policy

Setting Automated Backup Policy

Scenarios

DDS backs up data automatically based on the automated backup policy you set. You are advised to regularly back up data in your database. If the database becomes faulty or data is damaged, you can restore it with the backup, ensuring data reliability.

  • DDS checks existing automated backup files. If the retention period of a file exceeds the backup retention period you set, DDS will delete the file.
  • After the backup policy is modified, an automated backup will be triggered based on the new backup policy. The retention period of the previously generated automated backups remains unchanged.
  • Backup files are stored in OBS buckets.
  • When a DB instance is created, DDS enables the automated backup policy by default. The default settings of the parameters are as follows. You can modify them after a DB instance is created.
    • Backups are retained for 7 days by default.
    • The time window is in UTC by default.
    • Data is backed up every day by default.

Enabling or Modifying an Automated Backup Policy

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click Service List. Under Database, click Document Database Service.
  4. On the Instance Management page, locate the target DB instance on the Clusters tab or the Replica Sets tab and click its name.
  5. On the Backups & Restorations page, click Modify Backup Policy. If you want to enable the automated backup policy, click .

    Retention period refers to the number of days that data is kept. You can increase the retention period to improve data reliability.

    The backup retention period can range from 1 to 732 days, with a time window of one hour. The backup cycle varies according to the retention period you have set.

    • If you set the retention period to 1 to 6 days, data is automatically backed up each day of the week.
    • If you set the retention period to 7 to 732 days, you must select at least one day of the week for the backup cycle.

  6. Click OK to save the modification.
  7. View the backup result.

    • If the automated backup policy is enabled, an automated full backup is immediately triggered. The time it takes to complete the backup depends on the size of the job.
    • If the automated backup policy is modified, an automated full backup is randomly triggered during the time window you set. The time it takes to complete the backup depends on the size of the job.
    • During the creation of an automated backup, you can query the backup status on the Backup Management page or the Backups & Restorations tab. The backup status is Backing up.
    • In the upper right corner of the backup list, click to refresh the list. The backup status changes to Complete. The backup type is Automated and the backup method is Physical.

Disabling an Automated Backup Policy

If you disable the automated backup policy, DDS will not back up the data that would have normally been saved under the policy. Exercise caution when performing this operation.

  1. Log in to the management console.
  2. Click in the upper left corner and select a region and project.
  3. Click Service List. Under Database, click Document Database Service.
  4. On the Instance Management page, locate the target DB instance on the Clusters tab or the Replica Sets tab and click its name.
  5. On the Backups & Restorations page, click Modify Backup Policy. On the displayed page, click to disable the automated backup policy.

    You can determine whether to delete all automated backup files:

    • If you do not select Delete automated backups, all backup files within the retention period will be retained. You can manually delete them. For details, see section Deleting an Automated Backup.
    • If you select Delete automated backups, all backup files within the retention period will be deleted.

  6. Click OK.