Was this helpful?
clonedb Command--Clone a Database
Valid on Linux.
The clonedb utility clones a database between two servers. It can be used to move a database from one machine or cluster to another. It can be used, for example, to clone a production database for testing purposes.
The two instances must be at the same product version, including the same service pack level.
Note:  You cannot clone a database from one instance to another on the same machine.
Source and target II_SYSTEMs can differ.
Clonedb copies all of the schema in a database to the target; no partial database cloning is possible. The schema the database contains need not have active users in the target installation.
Cloning means making identical copies, so a database cannot be cloned between operating systems or products.
Note:  We recommend taking a checkpoint of the cloned database after cloning is complete.
This command has the following format:
clonedb -source_dbname source_dbname -source source_machine ‑source_ii_system source_II_SYSTEM
        ‑target_dbname target_dbname -target target_machine ‑target_ii_system target_II_SYSTEM
        [-key keyfile] [-trial] [‑source_user source_user] [-target user target_user]
-source_dbname source_dbname
Specifies the name of the database to be copied.
-source source_machine
Specifies the name of the source machine.
-source_ii_system source_II_SYSTEM
Specifies the II_SYSTEM path on the source machine.
-target_dbname target_dbname
Specifies the name of the target database.
-target target_machine
Specifies the name of the target machine.
-target_ii_system target_II_SYSTEM
Specifies the II_SYSTEM path on the target machine.
-key keyfile
Specifies the fully-qualified RSA key file for SSH authentication (for example: /.ssh/id_rsa). Specifying an authentication key is recommended; otherwise password authentication will be required multiple times instead of once. An authentication key can be generated by using the UNIX utility ssh-keygen.
-trial
Performs a trial copy (no files copied). The target installation is started, a database created.
‑source_user source_user
Specifies the name of the database user (installation owner) on the source system. Use this option to override the current user.
-target_user username
Specifies the name of the database user (installation owner) on the target system. Use this option to override the current user.
‑v
Runs clonedb in verbose mode, which displays messages as the operation proceeds.
Last modified date: 01/30/2023