1RT-SERIALIZER(1)      User Contributed Perl Documentation     RT-SERIALIZER(1)
2
3
4

NAME

6       rt-serializer - Serialize an RT database to disk
7

SYNOPSIS

9           rt-validator --check && rt-serializer
10
11       This script is used to write out the entire RT database to disk, for
12       later import into a different RT instance.  It requires that the data
13       in the database be self-consistent, in order to do so; please make sure
14       that the database being exported passes validation by rt-validator
15       before attempting to use "rt-serializer".
16
17       While running, it will attempt to estimate the number of remaining
18       objects to be serialized; these estimates are pessimistic, and will be
19       incorrect if "--no-users", "--no-groups", or "--no-tickets" are used.
20
21       If the controlling terminal is large enough (more than 25 columns high)
22       and the "gnuplot" program is installed, it will also show a textual
23       graph of the queue size over time.
24
25   OPTIONS
26       --directory name
27           The name of the output directory to write data files to, which
28           should not exist yet; it is a fatal error if it does.  Defaults to
29           "./$Organization:Date/", where $Organization is as set in
30           RT_SiteConfig.pm, and Date is today's date.
31
32       --force
33           Remove the output directory before starting.
34
35       --size megabytes
36           By default, "rt-serializer" chunks its output into data files which
37           are around 32Mb in size; this option is used to set a different
38           threshold size, in megabytes.  Note that this is the threshold
39           after which it rotates to writing a new file, and is as such the
40           lower bound on the size of each output file.
41
42       --no-users
43           By default, all privileged users are serialized; passing
44           "--no-users" limits it to only those users which are referenced by
45           serialized tickets and history, and are thus necessary for internal
46           consistency.
47
48       --no-groups
49           By default, all groups are serialized; passing "--no-groups" limits
50           it to only system-internal groups, which are needed for internal
51           consistency.
52
53       --no-assets
54           By default, all assets are serialized; passing "--no-assets" skips
55           assets during serialization.
56
57       --no-deleted
58           By default, all tickets and assets, including deleted ones, are
59           serialized; passing "--no-deleted" skips deleted tickets and assets
60           during serialization.
61
62       --scrips
63           No scrips or templates are serialized by default; this option
64           forces all scrips and templates to be serialized.
65
66       --acls
67           No ACLs are serialized by default; this option forces all ACLs to
68           be serialized.
69
70       --no-tickets
71           Skip serialization of all ticket data.
72
73       --limit-queues
74           Takes a list of queue IDs or names separated by commas. When
75           provided, only that set of queues (and the tickets in them) will be
76           serialized.
77
78       --limit-cfs
79           Takes a list of custom field IDs or names separated by commas. When
80           provided, only that set of custom fields will be serialized.
81
82       --hyperlink-unmigrated
83           Replace links to local records which are not being migrated with
84           hyperlinks.  The hyperlinks will use the serializing RT's
85           configured URL.
86
87           Without this option, such links are instead dropped, and
88           transactions which had updated such links will be replaced with an
89           explanatory message.
90
91       --clone
92           Serializes your entire database, creating a clone.  This option
93           should be used if you want to migrate your RT database from one
94           database type to another (e.g.  MySQL to Postgres).  It is an error
95           to combine "--clone" with any option that limits object types
96           serialized.  No dependency walking is performed when cloning.
97           "rt-importer" will detect that your serialized data set was
98           generated by a clone.
99
100       --incremental
101           Will generate an incremenal serialized dataset using the data
102           stored in your IncrementalRecords database table.  This assumes
103           that you have created that table and run RT using the
104           Record_Local.pm shim as documented in "docs/incremental-export/".
105
106       --gc n
107           Adjust how often the garbage collection sweep is done; lower
108           numbers are more frequent.  See "GARBAGE COLLECTION".
109
110       --page n
111           Adjust how many rows are pulled from the database in a single
112           query.  Disable paging by setting this to 0.  Defaults to 100.
113
114           Keep in mind that rows from RT's Attachments table are the limiting
115           factor when determining page size.  You should likely be aiming for
116           60-75% of your total memory on an otherwise unloaded box.
117
118       --quiet
119           Do not show graphical progress UI.
120
121       --verbose
122           Do not show graphical progress UI, but rather log was each row is
123           written out.
124

GARBAGE COLLECTION

126       "rt-serializer" maintains a priority queue of objects to serialize, or
127       searches which may result in objects to serialize.  When inserting into
128       this queue, it does no checking if the object in question is already in
129       the queue, or if the search will contain any results.  These checks are
130       done when the object reaches the front of the queue, or during periodic
131       garbage collection.
132
133       During periodic garbage collection, the entire queue is swept for
134       objects which have already been serialized, occur more than once in the
135       queue, and searches which contain no results in the database.  This is
136       done to reduce the memory footprint of the serialization process, and
137       is triggered when enough new objects have been placed in the queue.
138       This parameter is tunable via the "--gc" parameter, which defaults to
139       running garbage collection every 5,000 objects inserted into the queue;
140       smaller numbers will result in more frequent garbage collection.
141
142       The default of 5,000 is roughly tuned based on a database with several
143       thousand tickets, but optimal values will vary wildly depending on
144       database configuration and size.  Values as low as 25 have provided
145       speedups with smaller databases; if speed is a factor, experimenting
146       with different "--gc" values may be helpful.  Note that there are
147       significant boundary condition changes in serialization rate, as the
148       queue empties and fills, causing the time estimates to be rather
149       imprecise near the start and end of the process.
150
151       Setting "--gc" to 0 turns off all garbage collection.  Be aware that
152       this will bloat the memory usage of the serializer.  Any negative value
153       for "--gc" turns off periodic garbage collection and instead objects
154       already serialized or in the queue are checked for at the time they
155       would be inserted.
156
157
158
159perl v5.34.0                      2021-10-05                  RT-SERIALIZER(1)
Impressum