Products Support Documentation Download
Database Export Tool (rdm-export)
rdm-export [OPTION]... db-uri

rdm-export is a command-line utility that exports the schema and data of the specified RDM database for making a backup or migrating from one version of RDM to another. The produced script can recreate the database by being fed into rdm-sql.

Option Description
-h, --help Display this usage information
--version Display the version information
--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 Document root under which to place the database. (See Document Root (docroot))
-f, --force Overwrite an existing export file
-L, --locale=locale The string collation locale the database will use. (See locale)
--cat Export the schema definition into a catalog file
--stats Export the database statistics if available
--no-schema Do not export the schema definition. --no-triggers is implied.
--schema-only Export only the schema definition
--no-triggers Do not export the triggers
--triggers-only Export only the triggers
--csv Export into comma-separated (CSV) files
--xml Export into XML files
-o, --output=filename Name of the output file to export into
-t, --table=tablename Export only the specified table. Use this option more than once to export multiple tables.
db-uri An RDM Database URI

rdm-export attempts to export the tables in the order that's directly importable. For example, if table A references table B, rdm-export exports table B first, followed by table A, since importing table A may not be possible without importing table B first.

rdm-export currently does not handle "circular" references. A circular reference occurs when tables reference one another in a circular fashion (i.e., A references B, B references C and, C references A). In this case, rdm-export exports the tables and displays warnings, including the names of the tables that are in circular reference.

Usage Examples
Exporting an RDM database

You can run rdm-export to export an RDM database into an export file.

$ rdm-export bookshop

An SQL script file, bookshop.sql, will be created as the result. The file includes the table definitions as well as the number of SQL insert statements that matches the total number of rows contained in all the tables in bookshop.