![]() | ![]() | contents |
exporttofile — Starts the export client, connects to a database, and writes export data to one or more files.
exporttofile --servers {host-name[:port]} --nonce {unique-id} --connect {client | admin} --type {csv | tsv} [optional-arguments...]
exporttofile help
The exporttofile command starts the export client, connects to a running VoltDB database, fetches queued export data
and writes it to one or more files on the local system. The command arguments can appear in any order. However, the
--servers, --nonce, --connect, and --type
arguments are all required.
The export client writes data out to disk, one file per database table, "rolling" over to new files periodically. The filenames of the exported data are constructed from:
A unique prefix (specified with --nonce)
A unique value identifying the current version of the database catalog
The table name
A timestamp identifying when the file was started
While the file is being written, the file name also contains the prefix "active-". Once the file is complete and a new file started, the "active-" prefix is removed. Therefore, any export files without the prefix are complete and can be copied, moved, deleted, or post-processed as desired.
See Chapter 13, Exporting Live Data for more information about how export works.
A comma separated list of host names or IP addresses to query.
The prefix to use for the files that the client creates. The client creates a separate file for every table
that is exported, constructing a file name that includes a transaction ID, the nonce, the name of the table, a
timestamp, and a file type specified by the --type argument.
The port to connect to. You specify the type of port (client or admin), not the port number.
The type of files to create. You can specify either csv (for comma-separated files) or tsv (for tab-delimited files).
The username to use for authenticating to the VoltDB server(s). Required only if security is enabled for the database.
The password to use for authenticating to the VoltDB server(s). Required only if security is enabled for the database. If you specify a username but not a password, the export client prompts you for the password.
(Optional.) The directory where the output files are created. If you do not specify an output path, the client writes the output files to the current default directory.
(Optional.) The frequency, in minutes, for "rolling" the output file. The default frequency is 60 minutes.
(Optional.) Store the output files in subfolders that are "rolled" according to the frequency specified by
--period. The subfolders are named according to the nonce and the timestamp, with "active-"
prefixed to the subfolder currently being written.
(Optional.) Writes a JSON representation of each table's schema as part of the export. The primary output files of the export-to-file client contain the exported data in rows, but do not identify the datatype of each column. The JSON schema files can be used to ensure the appropriate datatype and precision is maintained if and when the output files are imported into another system.
(Optional.) The format to use when encoding VARBINARY data for output. Binary data is encoded in either BASE64 or hexadecimal format. The default is hexadecimal.
(Optional.) Alternate delimiter characters for the CSV output. The text string specifies four characters: the field delimiter, the enclosing character, the escape character, and the record delimiter. To use special or non-printing characters (including the space character) encode the character as an html entity. For example "<" for the "less than" symbol.
(Optional.) The format of the date used when constructing the output file names. You specify the date format as a Java SimpleDateFormat string. The default format is "yyyyMMddHHmmss".
(Optional.) The time zone to use when formatting the timestamp. Specify the time zone as a Java timezone identifier. The default is GMT.
(Optional.) Eliminates the six columns of VoltDB metadata (such as transaction ID and timestamp) from the
output. If you specify --skipinternals the output files contain only the exported table
data.
The following example connects the export client to a database cluster including the servers zeus and athena and
stores the export data as csv files using the unique identifier olympus in a subfolder called
/greece.
$ exporttofile --servers zeus,athena \
--nonce olympus \
--connect client \
--type csv \
--outdir ./greece
The Tao of VoltDB
The 5 Principles of VoltDB
VoltDB Technosphere
Products and Solutions
Technical Support
Key Features
Download VoltDB
No Limits
VoltDB Application Gallery
Infinite Possibilities
VoltBuilder Program
