rt-dump-initialdata - Serialize an RT database to disk
rt-validator --check && rt-dump-initialdata
This script is used to write out the objects initialdata supports from RT database to disk, for later import into a different RT instance. It requires that the data in the database be self-consistent, in order to do so; please make sure that the database being exported passes validation by rt-validator before attempting to use rt-dump-initialdata
.
While running, it will attempt to estimate the number of remaining objects to be dumped; these estimates are pessimistic, and will be incorrect if --no-users
or --no-groups
is used.
If the controlling terminal is large enough (more than 25 columns high) and the gnuplot
program is installed, it will also show a textual graph of the queue size over time.
The name of the output directory to write data files to, which should not exist yet; it is a fatal error if it does. Defaults to ./$Organization:Date/
, where $Organization is as set in RT_SiteConfig.pm, and Date is today's date.
Remove the output directory before starting.
By default, all privileged users are dumped; passing --no-users
limits it to only those users which are referenced by dumped tickets and history, and are thus necessary for internal consistency.
By default, all groups are dumped; passing --no-groups
limits it to only system-internal groups, which are needed for internal consistency.
By default, all assets are dumped; passing --no-assets
skips assets during serialization.
By default, all queues, custom fields, etc, including disabled ones, are dumped; passing --no-disabled
skips such disabled records during serialization.
By default, all assets, including deleted ones, are dumped; passing --no-deleted
skips deleted assets.
By default, all scrips and templates are dumped; passing --no-scrips
skips them.
By default, all ACLs are dumped; passing --no-acls
skips them.
By default, record ids are ordinarily excluded. Pass --sync
to include record ids if you intend to use this for sync rather than creating a generic initialdata.
The file path which the to be generated initialdata.json will compare to. If there are any changes, they will be saved to changes.json.
This option implies --sync
.
Adjust how often the garbage collection sweep is done; lower numbers are more frequent. It shares the same code with rt-serializer
, See "GARBAGE COLLECTION" in rt-serializer.
Adjust how many rows are pulled from the database in a single query. Disable paging by setting this to 0. Defaults to 100.
Do not show graphical progress UI.
Do not show graphical progress UI, but rather log was each row is written out.