rdm-export
Database 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 RaimaDB database for the purpose of making a backup or migrating
from one version of RaimaDB to another. The produced script can recreate the
database by being fed into rdm-sql
.
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 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 to use instead of the current working directory. The environment variable RDM_DOCROOT can also be used. (See Document Root (docroot)) |
--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) |
-f, --force | Overwrite an existing export file |
-L, --collate=collation-id | The string collation locale the database will use |
--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 generated SQL INSERT statement |
--no-triggers | Do not export 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=16.0 |
--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. |
--use-ssl | Use SSL for remote connections |
db-uri | An RDM database name or URI. See Database Identifier (db-uri) for more information. |
Comments
Specifying a database name will by default open the database in the current working directory. However, specifying a database URI will open the database on a remote TFServer. Examples of database name or URIs:
'MY_DB', 'tfs-tcp://localhost:21553/MY_DB', 'tfs-shm://MY_TFS/MY_DB'.
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.
This utility is uses the rdm_dbExport()
function to export data.