rt-serializer(8) | Request Tracker Reference | rt-serializer(8) |
rt-serializer - Serialize an RT database to disk
rt-validator --check && rt-serializer
This script is used to write out the entire 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-serializer".
While running, it will attempt to estimate the number of remaining objects to be serialized; these estimates are pessimistic, and will be incorrect if "--no-users", "--no-groups", or "--no-tickets" are 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.
Without this option, such links are instead dropped, and transactions which had updated such links will be replaced with an explanatory message.
Keep in mind that rows from RT's Attachments table are the limiting factor when determining page size. You should likely be aiming for 60-75% of your total memory on an otherwise unloaded box.
"rt-serializer" maintains a priority queue of objects to serialize, or searches which may result in objects to serialize. When inserting into this queue, it does no checking if the object in question is already in the queue, or if the search will contain any results. These checks are done when the object reaches the front of the queue, or during periodic garbage collection.
During periodic garbage collection, the entire queue is swept for objects which have already been serialized, occur more than once in the queue, and searches which contain no results in the database. This is done to reduce the memory footprint of the serialization process, and is triggered when enough new objects have been placed in the queue. This parameter is tunable via the "--gc" parameter, which defaults to running garbage collection every 5,000 objects inserted into the queue; smaller numbers will result in more frequent garbage collection.
The default of 5,000 is roughly tuned based on a database with several thousand tickets, but optimal values will vary wildly depending on database configuration and size. Values as low as 25 have provided speedups with smaller databases; if speed is a factor, experimenting with different "--gc" values may be helpful. Note that there are significant boundary condition changes in serialization rate, as the queue empties and fills, causing the time estimates to be rather imprecise near the start and end of the process.
Setting "--gc" to 0 turns off all garbage collection. Be aware that this will bloat the memory usage of the serializer. Any negative value for "--gc" turns off periodic garbage collection and instead objects already serialized or in the queue are checked for at the time they would be inserted.
2023-10-25 | perl v5.36.0 |