All Products
Search
Document Center

Database Backup:Add multiple data sources at a time

Last Updated:Nov 27, 2023

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

  1. Log on to the Database Backup (DBS) console.

  2. In the left-side navigation pane, click Data Source. On the Data Source page, select a region in the upper-left corner.

  3. On the Data Source page, click Add Data Source.

  4. Select Batch import from the Data source category drop-down list.

  5. 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.

    Note

    We 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.

    Note

    The 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.

    Note
    • The 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.

  6. Click Test Connection.

    Note
    • If 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.

  7. Click OK.

  8. 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: