You can import database assets into Bastionhost for centralized O&M and auditing. Bastionhost supports ApsaraDB RDS for MySQL, SQL Server, and PostgreSQL; PolarDB for MySQL, PostgreSQL, and PostgreSQL (Oracle-compatible); and self-managed databases for MySQL, SQL Server, PostgreSQL, and Oracle.
Supported editions
Enterprise Edition and SM Edition
If your Bastionhost instance is a Basic Edition instance, you must upgrade it to a supported edition. For more information, see Upgrade an instance.
Import databases from the current account
You can import database instances from your current Alibaba Cloud account into Bastionhost for O&M.
ApsaraDB RDS instances
Synchronize ApsaraDB RDS instances for MySQL, SQL Server, and PostgreSQL from your current Alibaba Cloud account to Bastionhost.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Database page, choose .
-
In the Select Region dialog box, select the region where the ApsaraDB RDS instances are located and click OK.
-
In the Import ApsaraDB RDS Databases dialog box, select the ApsaraDB RDS instances to import and click Import.
PolarDB clusters
Synchronize PolarDB clusters for MySQL, PostgreSQL, and PostgreSQL (Oracle-compatible) from your current Alibaba Cloud account to Bastionhost.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Database page, choose .
-
In the Select Region dialog box, select the region where the PolarDB clusters are located and click OK.
-
In the Import PolarDB for Xscale Database dialog box, select the PolarDB clusters to import and click Import.
Import databases from member accounts
Bastionhost supports centralized asset management across multiple accounts. If you have multiple Alibaba Cloud accounts and want to use a single Bastionhost instance to manage assets across them, you can integrate with Alibaba Cloud Resource Directory (RD) to unify O&M and control.
Before importing database assets from a member account, you must add the member account to your Bastionhost instance. For more information, see Unified management of multiple accounts.
ApsaraDB RDS instances
Synchronize ApsaraDB RDS instances for MySQL, SQL Server, and PostgreSQL from your member accounts to Bastionhost.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Database page, choose .
-
In the Select Alibaba Cloud Account wizard, select the target Alibaba Cloud account and click Next.
-
In the Select Region wizard, select the region where the ApsaraDB RDS instances are located and click OK.
-
In the Import ApsaraDB RDS Databases dialog box, select the ApsaraDB RDS instances to import and click Import.
PolarDB clusters
Synchronize PolarDB clusters for MySQL, PostgreSQL, and PostgreSQL (Oracle-compatible) from your member accounts to Bastionhost.
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose .
-
On the Database page, choose .
-
In the Select Alibaba Cloud Account wizard, select the target Alibaba Cloud account and click Next.
-
In the Select Region wizard, select the region where the PolarDB clusters are located and click OK.
-
In the Import PolarDB for Xscale Database dialog box, select the PolarDB clusters to import and click Import.
Import databases from other sources
You can import self-managed databases for MySQL, SQL Server, PostgreSQL, or Oracle by either configuring them individually or bulk-importing them from a file. Bastionhost provides templates in .xls, .csv, and .xlsx formats. You can fill out a template and upload the file to import the databases.
Single database
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose , and then choose .
-
In the Create Database panel, configure the database information, such as the name, protocol, address, and service port, and 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.
From a file
Log on to the Bastionhost console. In the top navigation bar, select the region where your Bastionhost instance is located.
In the list of Bastionhost instances, find the target instance and click Manage.
In the navigation pane on the left, choose , and then choose .
-
In the Import Database panel, click Download Database Template. After downloading the template, fill it with your database information, save the file, and then click Upload to upload it.
ImportantIn the database template, the Database Address field is required. If the Protocol is PostgreSQL, the Database Name (PostgreSQL) field is also required. Databases missing required fields will not be imported.
-
In the Databases to Be Imported dialog box, select the databases to import, and then click Import.
-
In the Import Database panel, click Import Database at the bottom.
If a database in the file has a name that duplicates another in the file or one that already exists in the system, it will not be imported. You can click Details in the Import Database panel to view the unimported databases.
Next steps
After adding a database asset, you must create a database account for it. After the account is created, O&M personnel can use it to log on to and manage the database. For more information, see Create and manage database accounts.
Related topics
After adding a database asset, if you need to modify its information, update its O&M address, or delete the asset, see Manage databases.