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
Short options can be combined into one string starting with a single '-'. Mandatory arguments to long options are mandatory for short options too. Long option arguments can also be specified in a separate argument.
| -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 keyfor the database ([algorithm:]passcode). The valid algorithms arexor,aes128,aes192andaes256. The AES algorithms are only available for packages that have strong encryption support. If an algorithm is not specified, the default isaes128for strong encryption packages andxorotherwise. | 
| --docroot=path | Document root to use instead of the current working directory. The environment variable RDM_DOCROOT can also be used. (See Document Root (docroot)) | 
| --commit=count | Commit per this number of rows. | 
| -f, --force | Overwrite an existing destination database | 
| --log-level=level | Set the log level (' --log-level=all', '--log-level=error', '--log-level=warning', '--log-level=info', '--log-level=mesg', or a number (5-99)) - the default is '99') | 
| --err-level=level | Set the error level (all, error, warning, info, mesg,or a number (5-99)) - the default is info) | 
| --use-ssl | Use SSL for remote connections | 
| --re-encode | Export the statistics if available | 
| source-db-uri | Database URI (db-uri) of the source for the database to copy. | 
| target-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