rt-serializer(8)
π rt-serializer β the Request Tracker Reference's own little data-dumper π
okay so bestie, this is rt-serializer(8), and it's giving "pack up my whole entire database and mail it somewhere else" energy. Let's get into it. π§β¨
πΈ NAME πΈ
rt-serializer β serialize an RT database to disk. literally writing your whole database out to files, no cap. πΎ
π SYNOPSIS π
rt-validator --check && rt-serializer
β¨ THE VIBE (what it actually does) β¨
So this script writes out the entire RT database to disk, so you can import it later into a different RT instance. cute, right? π¦
But here's the thing: it requires that the data in the database be self-consistent in order to do that. So please, bestie, make sure the database you're exporting passes validation by rt-validator before you even think about running rt-serializer. Don't skip this. π
While it's running, it'll try to estimate how many objects are left to serialize. Those estimates are pessimistic, and they will be wrong if --no-users, --no-groups, or --no-tickets are in play. so don't come for the progress bar, it's doing its best. π
Also! If your controlling terminal is big enough (more than 25 columns high) and the gnuplot program is installed, it'll show you a textual graph of the queue size over time. iconic behavior honestly. πβ¨
π OPTIONS π
--directory nameβ the name of the output directory to write data files to. It should not exist yet, and it's a fatal error if it does. Defaults to./$Organization:Date/, where$Organizationis whatever is set inRT_SiteConfig.pm, andDateis today's date. ποΈ--forceβ removes the output directory before starting. yeet it and begin. π₯--size megabytesβ by defaultrt-serializerchunks its output into data files around 32Mb in size; this option sets a different threshold size, in megabytes. Heads up: this is the threshold after which it rotates to writing a new file, so it's technically the lower bound on the size of each output file. math is math. π--no-usersβ by default all privileged users get serialized; passing--no-userslimits it to only the users referenced by serialized tickets and history, i.e. the ones that are necessary for internal consistency. π--no-groupsβ by default all groups get serialized; passing--no-groupslimits it to only system-internal groups, the ones needed for internal consistency. π«Ά--no-assetsβ by default all assets get serialized; passing--no-assetsskips assets during serialization. π--no-deletedβ by default all tickets and assets, including deleted ones, get serialized; passing--no-deletedskips deleted tickets and assets during serialization. π--scripsβ no scrips or templates are serialized by default; this option forces all scrips and templates to be serialized. π₯--aclsβ no ACLs are serialized by default; this option forces all ACLs to be serialized. π--no-ticketsβ skip serialization of all ticket data. ποΈβ--limit-queuesβ takes a list of queue IDs or names separated by commas. When provided, only that set of queues (and the tickets in them) will be serialized. π―--limit-cfsβ takes a list of custom field IDs or names separated by commas. When provided, only that set of custom fields will be serialized. π§©--hyperlink-unmigratedβ replaces links to local records which are not being migrated with hyperlinks. Those hyperlinks will use the serializing RT's configured URL. π Without this option, such links are instead dropped, and transactions which had updated such links get replaced with an explanatory message. lowkey sad but that's the deal.--cloneβ serializes your entire database, creating a clone. Use this if you want to migrate your RT database from one database type to another (e.g. MySQL to Postgres). It is an error to combine--clonewith any option that limits object types serialized. No dependency walking is performed when cloning.rt-importerwill detect that your serialized data set was generated by a clone. π§¬--incrementalβ will generate an incremenal serialized dataset using the data stored in yourIncrementalRecordsdatabase table. (yes, the manpage says "incremenal", we're leaving it, it's part of the lore π« ) This assumes you have created that table and run RT using theRecord_Local.pmshim as documented indocs/incremental-export/. π--gc nβ adjust how often the garbage collection sweep is done; lower numbers are more frequent. See GARBAGE COLLECTION below. π§Ή--page nβ adjust how many rows are pulled from the database in a single query. Disable paging by setting this to0. Defaults to100. π Keep in mind that rows from RT'sAttachmentstable 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. π§--quietβ do not show graphical progress UI. π€«--verboseβ do not show graphical progress UI, but rather log was each row is written out. (again, the manpage's wording, we respect the source βοΈ) π£οΈ
π§Ή GARBAGE COLLECTION π§Ή
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 whether the object in question is already in the queue, or whether the search will contain any results. Those checks happen later β 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,
- objects that 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 it's 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 mean 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. so like, don't panic. π
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 checks for objects already serialized or already in the queue at the time they would be inserted. π¨
and that's the whole page, bestie!! this was rt-serializer(8) from the Request Tracker Reference, shipped with perl v5.38.2, dated 2023-10-29 β go serialize something and slay π
β¨π¦
π¦ where this page comes from
- ubuntu noble: request-tracker4 4.4.7+dfsg-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms