Database Copy Utility


rdm-copy [OPTIONS]... source-db-uri destination-db-uri


rdm-copy is a command-line utility that copies the content of an existing database into a new one. Currently, the utility must be used with the '--re-encode' option. In a later patch or release, we intend to add the capability of not having to re-encode.


-h, --help Display this usage information
--version Display the version information
-q, --quiet Quiet mode. No information will be displayed

Specify the encryption key for the database ([algorithm:]passcode). The valid algorithm are:

xor XOR encryption key
aes128 128 bit AES encryption key
aes192 192 bit AES encryption key
aes256 256 bit AES encryption key

The aes algorithms are only available for packages that have strong encryption support. If an algorithm is not specified, the default is aes128 for strong encryption packages and xor otherwise.

--docroot=path The location of the docroot directory. (See Document Root)
-c, --commit=count Commit per this number of rows.
-f, --force Overwrite an existing destination database.
--log-level=level Set the log level (all, error, warning, or info - the default is info)
--re-encode Export the statistics if available
source-db-uri Database URI (db-uri) of the source for the database to copy.
destination-db-uri Database URI (db-uri) of the destination for the database copy.


rdm-copy copies an existing (source) database into a new (target) database. The '--re-encode' option must be specified. With the '--re-encode' option, rdm-copy reads (i.e. decodes) the data in the existing database into row values and writes (i.e., re-encodes) them into the new database.

The source and target databases can be associated with an embedded or remote TFS. If the '--docroot' option is specified, either database whose name does not include a TFS specification in the db-uri is assumed to be associated with the embedded TFS specified with '--docroot'. If both source and target database names include a TFS specification in the db-uri, the '--docroot' option is ignored.

rdm-copy copies meta-data such as catalog and collation information.

To ensure data consistency, rdm-copy performs the read and write operations in one transaction. This may cause an out-of-memory error on a resource-constrained platform. To reduce the footprint of the copy operation, use '--commit' option to specify the number of rows the utility processes before it issues a COMMIT, For example, specifying '--commit=1000' lets rdm-copy issue a COMMIT every 1,000 rows it copies.

Usage Examples

Copying a database in an embedded TFS

$ rdm-copy --docroot=/home/build/db_dir --re-encode MY_DB MY_NEW_DB

Copying an embedded database to a remote TFS named "remote_tfs"

$ rdm-copy --re-encode MY_DB tfs://remote_tfs/MY_DB