Database Backup (DBS) provides the batch import feature. You can use this feature to add multiple data sources of the same type at a time, which facilitates subsequent management and backup. This topic describes how to add multiple data sources at a time.
Usage notes
The batch import feature is available only for self-managed MySQL databases that are connected over the Internet.
Pricing
You are not charged when you add a data source. You are charged if you enable backup for the added data source. For more information about how to enable backup for a data source, see Back up databases.
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 Add Data Source.
Select Batch import from the Data source category drop-down list.
In the Batch data source field, enter multiple data sources.
Enter a data source in the following format:
$instanceName,$host,$port,region,MySQL,$account,$password
. Press the ENTER key to move to a new line. Example:test,127.0.0.1,3306,cn-hangzhou,MySQL,testuser,password
The following table describes the parameters.
Parameter
Description
instanceName
The name of the data source.
NoteWe recommend that you specify a descriptive name that makes it easy to identify.
host
The endpoint that is used to connect to the data source.
port
The port number that is used to connect to the data source.
region
The region in which you want to store the backup data.
NoteThe region must be the same as the region that you selected in Step 2. For example, if you set the region parameter to cn-hangzhou, the specified database is backed up in the China (Hangzhou) region.
MySQL
The database engine. Set this parameter to MySQL.
account
The database account.
NoteThe account is used to log on to the database that is used as the data source. The account must have the required permissions. For more information, see Account permissions.
After you add a data source and configure a database account and password, you can change the database account and password in the DBS console. For more information, see Configure the account and password for a data source.
password
The password of the database account.
Click Test Connection.
NoteIf the database account and password that you entered are valid, a message that indicates the connection is successful appears.
If the database account and password that you entered are invalid, a message that indicates the connection fails appears. In this case, you can click Check to view the cause of failure.
Click OK.
Optional. You can view the added data sources on the Data Source page in the DBS console.
What to do next
After you add the data source, you can back up the data in the data source. For more information, see Back up databases.
References
Other methods to add data sources: