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
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-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.
- --directory name
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-userslimits 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-groupslimits it to only system-internal groups, which are needed for internal consistency.
By default, all assets are dumped; passing
--no-assetsskips assets during serialization.
By default, all queues, custom fields, etc, including disabled ones, are dumped; passing
--no-disabledskips such disabled records during serialization.
By default, all assets, including deleted ones, are dumped; passing
--no-deletedskips deleted assets.
By default, all scrips and templates are dumped; passing
By default, all ACLs are dumped; passing
By default, record ids are ordinarily excluded. Pass
--syncto include record ids if you intend to use this for sync rather than creating a generic initialdata.
- --base file
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
- --gc n
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.
- --page n
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.