rdm-export

Data export utility

Synopsis

rdm­export [OPTION] … db-uri

Description

rdm-export is a command-line utility that exports the schema and data of the specified RDM database for the purpose of 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.

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)
-f, --force Overwrite an existing export file
-L, --collate=collation-id The string collation locale the database will use
-L, --log-level=level The string collation locale the database will use. (See locale)
--cat Export the schema definition into a catalog file
--stats Export the statistics if available
--no-schema Do not export the schema definition
--schema-only Export only the schema definition
--no-column-list Do not include the list of columns in the genedated SQL INSERT statement
--no-triggers Do not export the triggers
--triggers-only Export only the triggers
--sql-query=query Export the data specified by the SQL query
--triggers-only Export only the triggers
--raw-version=# Export for data migration. Supported values are: --raw-version=15.1
--raw Export into system-defined raw-format (RAW) file
--csv Export into comma-separated (CSV) files
--xml Export into XML files
--start-read Start a read transaction to read the content of the database (default)
--start-snapshot Start a snapshot to read the content of the database
-o, --output=file_name Name of the output file to export into
-t table_name,
--table=table_name
Name of the table for which to export data. Specify this option multiple times to export more than one table. If this option is not specified, all tables will be exported.
db-uri An RDM Database URI

Comments

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.

When exporting data in CSV or XML format, rdm-export creates a separate output file for each table. The name of the output file will be <databasename_tablename>.<extension>. The extension will be csv for CSV export, and xml for XML export.