RT-IMPORTER(1)

πŸ“¦
version 5.0.10 Β· 4 versions
, in fedora 43

πŸ’– rt-importer β€” the glow-up your RT database deserves πŸ’–

okay bestie, listen. this is rt-importer, and she lives in the User Contributed Perl Documentation section of your manual, filed under RT-IMPORTER(1). she's the one who takes a whole serialized RT database and pours it on top of the one you already have. no cap.


✨ NAME ✨

rt-importer β€” import a serialized RT database on top of the current one 🫢


πŸ¦‹ SYNOPSIS πŸ¦‹

rt-importer path/to/export/directory

🌸 DESCRIPTION 🌸

so like, this script is the girl who handles the contents of a dump that rt-serializer made. she goes and creates all the objects from that dump inside your current database β€” and yes bestie, that can include users, queues, and tickets. the whole ensemble. πŸ’…

you can stop the import mid-way with Ctrl+C if you need to β€” she won't be dramatic about it β€” and you can resume later by just re-running the importer. iconic behaviour honestly.

now, the tea: certain records (notably queues and groups) get their original Organization name prepended to them when they come in. why? mainly to dodge duplicate names, because imagine importing a General queue into an RT that already has a General queue β€” the name collision error would be giving chaos. 😭

if you're confident you won't hit any name collisions in queues or groups, you can suppress this whole prepending thing by passing the --exclude-organization flag to rt-importer.

πŸŽ€ OPTIONS πŸŽ€

  • --list β€” prints a lil summary of everything chillin' in the dump. a vibe check for your data.
  • --quiet β€” suppresses the progress bars during an import. she's quiet, she's mysterious. this one is implied when your output isn't going directly to a terminal, because obviously nobody wants progress bars in a log file.
  • --originalid cfname β€” takes the original ticket's organization and ID and places them into a global custom field with the name you give. and if there's no global ticket custom field with that name in the current database? she just creates one. main character energy, honestly.
  • --exclude-organization β€” normally certain records (groups, queues, the --originalid custom field) include the organization name of the original RT instance. use this flag to suppress that and just use the original name directly.
  • --ask β€” prompts you for action whenever an error pops up while inserting a record into the database. this happens a lot when you're importing data from very old RTs where some attachments (usually spam πŸ™ˆ) contain invalid UTF-8.

the importer will pause and ask if you wanna ignore the error and keep going, or abort (and potentially restart later). be so fr though: ignoring errors means missing records in the database, which may cause database integrity problems later. so if you ignored any errors, you should run rt-validator after the import. no exceptions bestie.

  • --ignore-errors β€” ignores all record creation errors and keeps on going while importing. this is literally the same as running with --ask and manually typing ignore at every single prompt. you should always run rt-validator after importing with errors ignored.
⚠️ this option can be dangerous and leave you with a broken RT! πŸ’€
  • --dump class[,class] β€” prints Data::Dumper representations of the objects of type class in the serialized data. mostly for debugging, iykyk.

works only in conjunction with --list.

  • --no-auto-commit β€” don't auto commit to the database. when this flag is used, she commits only once for each data file. this could boost performance in some cases. slay.
  • --batch-user-principals NUMBER β€” the number of user principals to create in batch beforehand. default is 0. this is to improve performance for not-cloned serialized data of big instances; usually you don't need to specify this.
  • --batch-group-principals NUMBER β€” the number of group principals to create in batch beforehand. default is 0. this is to improve performance for not-cloned serialized data of big instances; usually you don't need to specify this.
  • --batch-size BATCH_SIZE β€” create objects in batch. default is 0, which means batch processing is not enabled. this is for data serialized with --clone or --all. for cloned serialized data, each batch processing will also take place in a separate child process. 🧚
  • --max-processes MAX_PROCESSES β€” the number of max allowed child processes for batch processing. default is 10. this one is for cloned serialized data only.

πŸ‘‘ CLONED DATA πŸ‘‘

some dumps may have been taken as complete clones of the RT system, and those are only suitable for inserting into a schema that has no data in it. zero. empty. a clean slate. ✨

you can set up the required database state for the receiving RT instance by running:

/usr/bin/rt-setup-database --action create,schema,acl --prompt-for-dba-password

the normal make initdb step will not work here, because it also inserts core system data. and that would ruin the whole no-data-in-it situation, so. yeah. πŸ™‚β€β†•οΈ


and that's the whole page, bestie!! this fine piece of documentation was brought to you by perl v5.42.3 and dated 2026-07-20 β€” go forth and import responsibly, run rt-validator, and don't you dare touch --ignore-errors without a backup. mwah πŸ’‹πŸ’–πŸŒˆ

πŸ“¦ where this page comes from