All Products
Search
Document Center

Bastionhost:Import databases

Last Updated:Mar 31, 2026

Import databases into Bastionhost to centrally manage and audit O&M access. Bastionhost supports ApsaraDB RDS for MySQL, ApsaraDB RDS for SQL Server, and ApsaraDB RDS for PostgreSQL instances; PolarDB for MySQL, PolarDB for PostgreSQL, and PolarDB for PostgreSQL (Compatible with Oracle) clusters; and self-managed MySQL, SQL Server, PostgreSQL, and Oracle databases.

Prerequisites

Before you begin, ensure that you have:

  • A Bastionhost instance running Enterprise Edition or SM Edition. Basic Edition does not support database asset management. To upgrade, see Upgrade instance type.

Choose an import method

Select the method that matches your database source:

SourceMethod
ApsaraDB RDS or PolarDB in your current Alibaba Cloud accountImport from the current account
ApsaraDB RDS or PolarDB in a member account (multi-account setup)Import from a member account
Self-managed MySQL, SQL Server, PostgreSQL, or Oracle databaseImport from other sources

Import the databases within the current Alibaba Cloud account

Import ApsaraDB RDS instances

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database.

  4. Choose Import ApsaraDB RDS Databases > Import Instances of Current Account.

  5. In the Select Region dialog box, select the region of the ApsaraDB RDS instances and click OK.

  6. In the Import ApsaraDB RDS Databases dialog box, select the instances and click Import.

Import PolarDB clusters

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database.

  4. Choose Import PolarDB for Xscale Database > Import Instances of Current Account.

  5. In the Select Region dialog box, select the region of the PolarDB clusters and click OK.

  6. In the Import PolarDB for Xscale Database dialog box, select the clusters and click Import.

Import the databases of members

Bastionhost supports centralized O&M management across multiple Alibaba Cloud accounts using Resource Directory. Before importing databases from a member account, add the member to your Bastionhost instance. For details, see Use the multi-account management feature.

Import ApsaraDB RDS instances

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database.

  4. Choose Import ApsaraDB RDS Databases > Import Instances of Member Accounts.

  5. In the Select Alibaba Cloud Account step, select an account and click Next.

  6. In the Select Region step, select a region and click OK.

  7. In the Import ApsaraDB RDS Databases dialog box, select the instances and click Import.

Import PolarDB clusters

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database.

  4. Choose Import PolarDB for Xscale Database > Import Instances of Member Accounts.

  5. In the Select Alibaba Cloud Account step, select an account and click Next.

  6. In the Select Region step, select a region and click OK.

  7. In the Import PolarDB for Xscale Database dialog box, select the clusters and click Import.

Import databases from other sources

Import self-managed MySQL, SQL Server, PostgreSQL, or Oracle databases by entering database details manually, or import multiple databases at once using a file. Use the file import method when you need to add more than a few databases in a single operation. Bastionhost provides template files in XLS, CSV, and XLSX formats.

Import a self-managed database

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database, then choose Import Databases from Other Sources > Create Database.

  4. In the Create Database panel, configure the Database Instance Name, Protocol, Database Address, and Service Port, then click Create.

After the database is created, click Add Account to create a database account, or click Back to List to return to the database list.

Import multiple databases using a file

Important

Before uploading the template file, note these requirements:

  • The Database Address field is required for all databases.

  • If a database uses the PostgreSQL protocol, the Database (PostgreSQL) field is also required.

  • Databases with missing required fields are not imported.

  • If multiple entries share the same name, only the last entry with that name is imported. If an entry shares a name with a database already in Bastionhost, that entry is skipped. Click Details in the Import Database panel to review databases that were not imported.

  1. Log on to the Bastionhost console and select the region where your Bastionhost instance is deployed.

  2. In the instance list, find your instance and click Manage.

  3. In the left-side navigation pane, choose Assets > Database, then choose Import Databases from Other Sources > Import Databases by Using File.

  4. In the Import Database panel, click Download Database Template. Decompress the downloaded package, open the Excel template, fill in the database information, and save the file.

  5. Click Upload to upload the completed Excel file.

  6. In the Databases to Be Imported dialog box, select the databases and click Import.

  7. In the Import Database panel, click Import Database.

What's next

After importing a database, add an account for it so that O&M engineers can log on and perform operations. For details, see Add and manage database accounts.

To modify database information, update the O&M address, or remove a database from Bastionhost, see Manage databases.