Database Backup (DBS) provides the batch backup feature to allow you to back up one or more databases. This topic describes how to back up one or more databases. In this example, the logical backups of MySQL databases are configured.
For more information about how to back up different types of databases, see Backup and restoration overview.
Prerequisites
A data source is added. For more information, see Add a data source, Add multiple data sources at a time, and Configure automatic access to a data source.
The database account and password are configured for the data source. For more information, see Configure the account and password for a data source.
A backup policy template is created. For more information, see Create a backup policy template.
Procedure
Log on to the Database Backup (DBS) console.
In the left-side navigation pane, click Data Source. On the Data Source page, select a region in the upper-left corner.
On the Data Source page, click Batch backup.
In the Select the backup source type dialog box, configure the Data source type and Backup Method parameters, and click Start Batch Backup.
NoteIf you want to back up multiple databases at a time, all of the databases that you want to back up must be of the same engine and use the same backup method. For example, you can perform logical backups for multiple MySQL databases at a time or perform physical backups of multiple Oracle databases at a time.
In the Data Source step, all available data sources are displayed.
In the Data Source step, select the data sources that you want to back up and click Next Select Backup Objects.
NoteYou can select one or more databases in this step. You cannot select data sources across pages. By default, a maximum of 20 data sources are displayed on each page. If you want to back up more than 20 data sources, we recommend that you perform batch backup operations multiple times.
To search for a data source, you can enter the name of the data source or filter the data source based on the logical group of the data source. For more information, see Create a logical group and add a data source to the logical group.
If the database username and password are not configured for the data source that you want to back up, you must configure the username and password. For more information, see Configure the account and password for a data source.
In the Backup Object step, click the data sources that you select, select the databases and tables that you want to back up, and then click the right arrow to move the databases and tables from the Available section to the Selected section. Click Next Configure Backup Settings.
NoteIf you back up an entire database, additional database objects such as backup indexes and stored procedures are also backed up. The objects that can be backed up vary based on the database engine. For more information, see Database engines and features or Backup and restoration overview.
You can also click One-click backup in the upper-left corner to back up all databases and tables.
In the Backup Configuration step, select a backup schedule specification, modify backup configurations, and then click Next Configure Backup Policy.
Click Select the specifications. In the dialog box that appears, select a backup schedule specification and click OK.
NoteThe backup schedule specification that you select is applied to all data sources that are added to the batch backup. You cannot configure the backup schedule specification for each data source.
The free quota for data backup, unit price, and backup and restoration performance vary based on specifications. For more information, see Select a backup schedule type.
Click Modify the backup configuration in bulk. In the dialog box that appears, modify the parameters that are described in the following table and click OK.
Section
Parameter
Description
The underlying configuration
maximum number of parallel threads for a full backup
The maximum number of parallel threads available for a full data backup.
NoteThe maximum number of actual concurrent threads varies based on backup schedule specifications. The number displayed in the console shall prevail.
Incremental real-time backup
Specifies whether to enable the incremental backup feature.
Advanced configuration
N/A
N/A
NoteTo modify the backup configuration of a data source, you can click Modify the backup configuration in the Actions column of the data source.
In the backup policy step, click Batch apply backup strategies. In the dialog box that appears, select a backup policy that you want to apply and click OK. Then, click Next Purchase Backup Schedule.
NoteA backup policy includes configuration items for a backup schedule, such as the backup method, storage method, backup frequency, backup cycle, and backup start time. For more information, see Create a backup policy template.
To modify the backup policy for a data source, move the pointer over Select an option. in the backup policy column of the data source.
In the Purchase Schedule step, confirm the order information, read and agree to service terms by selecting the check box, and then select Auto-renewal at expiration based on your business requirements. Click Batch order and complete the payment.
After the payment is successful, DBS automatically configures the backup schedule and performs a precheck. During the precheck, DBS initializes the backup schedule and checks the configuration environment.
NoteThe precheck takes about 1 or 2 minutes to complete. The larger the data source, the longer the precheck takes. You can click Precheck Progress to view details.
After the precheck is successful, click Turn on backup.
Then, DBS automatically starts the backup schedule. You can view the created backup schedule on the details page of the data source that you backed up.
What to do next
View the backup schedule. For more information, see View a backup schedule.
Restore a database from the backup. For more information, see Restore a database.
FAQ
Q: What do I do if the status of the backup set shows the
java.lang.OutOfMemoryError: Java heap space
exception after I initiate a backup?A: If the backup databases and tables involve issues such as unreasonable table structures, large tables, and large fields, and you select a relatively low backup schedule specification, the resources of the backup schedule may be insufficient and backup exceptions may occur. We recommend that you select a backup schedule with a higher specification, or upgrade the backup schedule specification if an exception occurs, and then try again. If the issue still exists, you can join the DingTalk group (group ID: 35585947) for DBS to seek help.
Q: What do I do if a backup schedule for a PolarDB for MySQL cluster fails due to a failed precheck on the binary logging feature of the source database?
A: The precheck fails because the binary logging feature is disabled for the PolarDB for MySQL database. You can enable the binary logging feature for your database in the PolarDB console. For more information, see Enable binary logging.
Q: What do I do if a backup schedule for a self-managed SQL Server database fails due to a failed precheck on the database permissions?
A: The reason for the failed precheck is that the account that performs backup operations does not have the required permissions. You must assign the Sysadmin role to the NT AUTHORITY\SYSTEM account. You can execute the following SQL statement to assign the role:
SQL statement
ALTER SERVER ROLE [sysadmin] ADD MEMBER [NT AUTHORITY\SYSTEM] GO