rdm-copy
Database Copy Utility
Synopsis
rdm-copy [OPTIONS]... source-db-uri destination-db-uri
Description
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.
Options
-h, --help | Display this usage information |
--version | Display the version information |
-q, --quiet | Quiet mode. No information will be displayed |
--key=key | Specify the encryption key for the database ([algorithm:]passcode ). The valid algorithms are xor , aes128 , aes192 and aes256 . 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 Database Storage Location) |
-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. |
Comments
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