百度智能云

All Product Document

          Relational Database Service

          Backup Management

          Set the automated backup

          Data backup can assist users in recovering the database to the designated time before incorrect operation if an incorrect operation is detected, helping minimize the loss. The backup set is automatically backed up once a day. The RDS supports the setting of a custom backup cycle to meet the users' different backup needs fully and alleviate the users' OPS workload.

          Backup means

          Presently, the RDS provides two automated backup means, as detailed below:

          1. Backup by disk space
          • Store the backup data free of charge. But, the storage size is not larger than the complimentary storage space.
          • Up to 30 backup sets are reserved by default, including automated backups and manual backups.
          1. Backup by the duration:
          • Backup data is stored by the duration;
          • If the size exceeds the complimentary storage space, the excess part is charged.
          • You can define the backup retention time (range: 7-730 days).

          Classification by different database types and series is as follows:

          Database Type Series Backup by Disk Space Backup by Duration:
          MySQL Standalone Basic Support ——
          MySQL Dual-computer High-availability Version Support Support
          MySQL Raft Financial —— ——
          SQL Server Standalone Basic Support ——
          SQL Server Dual-computer High-availability Version Support Support
          PostgreSQL Dual-computer High-availability Version —— ——

          Notes:

          • Cloud database RDS presents you with backup storage space, free of charge.
          • Backup means: You can perform backup by disk space and by duration, You can choose the backup means according to your needs.
          • If the backup size exceeds the complimentary storage space, the excess part is charged. See Backup Storage Billing for Details
          • Stanbalone Basic Version only supports "Backup by disk space".
          • Currently, cloud database RDS for PostgreSQL only reserves the backups within 7 days, and custom backup policy feature offers support as soon as possible. If you have special needs, just get in touch with us by ticket. Thanks!

          Operation guide

          1. On the "Backups" page of the instance, you can see the list of the created backups (snapshot) and the backup information.

          image.png

          1. Click the "Set Automated Backup" button to set backup retention means, backup start time, and automated backup cycle, and view the usage of backup storage space. Click "OK" to successfully set the automated backup. Then the backup task is automatically executed on schedule according to this plan. Presently, two backup means are available:
          • Backup by the disk storage space: Free-of-charge store the backup data. But, the storage size is not greater than the complimentary storage space.

          • Backup by the duration: Store the backup data by duration. If the size exceeds the complimentary storage space, you have to pay for the excessive part.

          Manual backups

          Create manual backups

          Click the "Manual Backups" on the backup subpage to start the backup, which lasts for a few minutes. Meanwhile, you are unable to perform any management operation to this RDS instance.

          image.png

          Download backups

          If you need to recover a given backup data locally, You can download the backup data.

          1.On the backup management page, click "Download" in the backup operation column.

          image.png

          2.Select "Direct Download" or "Copy Link" to complete the backup downloading.

          image.png

          Notes: Please make sure your local database version keeps consistent with the database version for recovery. For example, if you hope to restore the cloud database RDS instance as MySQL5.6 Version, your local database must be MySQL5.6 Version.

          You cannot use the downloaded backup database directly in a locally created MySQL database, and but should process it using XtraBackup tool. Handling process is as follows:

          1. After downloading xtrabackup program of the latest version, unzip backup.gz first, and then take advantage of unpacking tool in xtrabackup for unpacking, execute the command: mkdir -p /home/mysql/data_dir && gzip -d -c backup.gz | xbstream -x -C /home/mysql/data_dir
          2. After unzipping and unpacking, apply redo-log of innodb, and execute the command: innobackupex --defaults-file=/home/mysql/data_dir/backup-my.cnf --apply-log /home/mysql/data_dir;
          3. Locally install MySQL database and make sure the database version keeps consistent with the RDS version.
          4. Define /home/mysql/data_dir folder as the data directory, and add --skip-grant-tables parameter to start database.
          5. Log in to the database to execute flush privileges, and reauthorize the database account.
          6. Restart the database
          7. Log in to the database with a new account and password.

          Recover backup

          The current recover feature covers the entire instance's data and does not support the "Recover single database or data sheet". That leads to a relatively high risk. Given the data security, the feature of recovering backup has been disenabled.

          Note:

          • If you need to recover the entire instance's data, recommend you to use the "Clone Instance" feature. View the text below for details on "Clone Instance".

          Clone instance

          Application scenarios

          "Clone instance" refers to a new instance created by "backup + binlog" means, which is consistent with the original instance in their data and configurations (like backup setting and parameter setting). "Clone Instance" feature helps users minimize on-line data loss or corruption resulting from the incorrect operation. After the incorrect operation, the user, by cloning the instance, can recover the data to the designated time before the incorrect operation.

          Typical application scenarios for cloning instance include:

          • The incorrect operation to the database, recover the database to a designated automatic/manual available backup set in the past;
          • The incorrect operation to the database, recover the database to a designated time in the past;
          • Recover a given datasheet of the database/a given database to one new datasheet/new database.
          • On the premise of no influence on the normal running of the on-line environment, create a test environment that keeps consistent with the on-line environment.

          Notes:

          • Presently, the "Clone Instance" feature only supports the database of MySQL type.
          • Billing standard for "Clone Instance" keeps consistent with the master instance billing standard. See Pricing for details.

          Principle instructions

          "Clone Instance" feature supports data recovery through replication of new instance by time or by backup set. Backup set refers to the dataset of all completed and available backups, and each backup dataset's name is the time when the backup is complete. The time scope for the time-based recovery ranges from the time of completing the first available backup set to the current time. If no backup set is available, the time is not optional, and the default time is the current time.

          Note: When the user selects "Clone an instance by the time point" and if upgrading/data recovery/xmaster recovery takes place from the backup time to the target time, the system reports an error and gives reasons after you select the time point.

          The cloned new instance is named "$ Former instance name _replica". During the creation of the cloned instance, there is no influence on master instance status and running. In terms of region, AZ, database type, and version, the new instance keeps consistent with the master instance, but the instance specification can be higher.

          1. In the case of instance cloning by backup set, the master instance backup set must have at least one backup replica.
          2. Only support cloning of master instance. If read-only and proxy instances are attached to the original instance, only the master instance gets cloned.
          3. In terms of whitelist setting, backup setting, and parameter setting, the new instance keeps consistent with the master instance. The extranet enabling setting is free from influence by the original instance, and Extranet becomes disabled by default.
          4. Database information in the new instance is only consistent with original information of the cloned backup set.
          5. The new instance account information gets cloned in the following way:

            • If both the backup set and master instance are a high-privilege account, the new instance's account is the master instance's high-privilege account.
            • If both the backup set and master instance are a common account, the new instance's account is consistent with the account in the backup set.
            • If the backup set is a common account and the master instance is a high-privilege account, the new instance's account is the master instance's high-privilege account.
            • After the new instance commences running, the instance management has nothing to do with the source instance.

          Operating steps

          1. Enter "Clone Instance" operation in two ways:
          • Way 1: find the instance to clone on the "Instance List" page and select the "Clone Instance" on the corresponding action column to go to the Clone page.
          • Way 2: Click "Instance Name" to go to the Instance Details page, select the "Backup" tab, and click "Clone Instance".
          1. According to the payment mode, select "Prepaid" or "Postpaid" to go to the corresponding tab and select the configuration;
          1. Select region information, data recovery means, and configuration information.

            Notes:

            • Data can be recovered by two ways, namely, by time and by backup set.
            • In configuration information of cloned instance, the memory and disk are the same as or superior to the master instance by default.
            • When instances are cloned by batch, up to 5 instances can be cloned.
          1. After the configuration is completed, click the "Next" for payment.
          Previous
          Monitoring and Alarm
          Next
          Parameter Management