You need to enable JavaScript to run this app.
RDS for PostgreSQL

RDS for PostgreSQL

Copy page
Download PDF
Managing databases
Cloning a database
Copy page
Download PDF
Cloning a database
RDS for PostgreSQL supports cloning existing databases to quickly create new databases with the same structure as existing databases. This article describes the steps for cloning a database.​
Precautions​
  • Only one clone database task can exist under an instance.​
  • A maximum of 2000 databases can be created under one instance. When the number of database instances has reached 2000, the database cannot be cloned.​
  • Only databases with no more than 1000 cloned tables are supported.​
  • During the process of cloning a database, you cannot perform DDL operations on the database.​
Prerequisites​
  • Already created an instance, and the instance is Running. For more information about creating an instance, see Creating an instance.​
  • The database has been created under the target instance. For more information about creating an account, see Creating an account.​
Procedure​
  1. In the upper-left corner of the top menu bar, select the project and region for the instance.​
tip​
If the project of the instance has not been set, the project should be selected as All resources.​
  1. Click on Instances in the left navigation bar.​
  1. On the Instances page, click on the target instance name.​
  1. At the top of the page, click Databases.​
  1. In the Databases list, click ... > Clone this database in the target database Actions column.​
  1. In the pop-up Clone this database window, after completing the following configuration and checking the restriction information, click OK.​
  • ​
    Configuration item​
    Is it required?​
    Description​
    Source database name​
    -​
    Confirm the target database to be cloned.​
    New database name​
    Yes​
    Set the name of the new database. The Database name must follow these rules:​
    • The name is unique within the instance.​
    • 2 to 63 characters in length.​
    • Must start with a letter and end with a letter or a digit.​
    • Can contain letters, digits, underscores (_) and hyphens (-).​
    • Some reserved words or keywords cannot be used in the database name, see Reserved keywords for all reserved keywords.​
    tip​
    The new database is named by default with the source database name + _clone_ + timestamp.​
    Data options​
    Yes​
    Currently only the structure of a cloned database is supported.​
    PL/pgSQL options​
    No​
    You can check whether to clone the following contents of the source database on demand:​
    • Views​
    • Stored procedures​
    • Functions​
    • Triggers​
    Risk warning​
    Yes​
    Check the prompt after confirming the known limitations of the clone database.​
    tip​
    When the instance size is low, the reading and writing pressure is high, and the number of tables in the target database is large, the process of cloning the database will last for a long time. During the process of cloning a database, you cannot perform DDL operations on the database.​
    ​
Related APIs​
​
API​
Note​
Calling the CloneDatabase interface clones the database.​
​
Last updated: 2025.11.17 16:15:15