rt-importer(8)

πŸ“¦
version 4.4.7 Β· 5 versions
, in ubuntu noble

✨ rt-importer(8) ✨

okay bestie, welcome to the Request Tracker Reference glow-up of rt-importer(8) β€” this is the little tool that yeets a whole serialized RT database on top of the one you already have. πŸ’–


🌸 NAME 🌸

rt-importer β€” import a serialized RT database on top of the current one. no cap, that's literally the whole job.


πŸ¦‹ SYNOPSIS πŸ¦‹

rt-importer path/to/export/directory

So this script exists to slurp up the contents of a dump that rt-serializer made earlier. It's gonna create all of the objects from that dump inside your current database β€” which can totally include users, queues, and tickets. πŸ‘‘

And here's the cute part: you can stop the import whenever with ^C πŸ’€ and then just re-run the importer later to resume it. She's resilient like that.

Certain records β€” notably queues and groups β€” will get their original Organization name prepended to them on import. Why? Mostly to dodge duplicate names, because fr fr, importing a General queue into an RT that already has one would otherwise cause a name collision error. 😭 So if you're confident you won't have any name collisions in queues or groups, you can suppress this behavior by passing the --exclude-organization flag to rt-importer. slay.

πŸ’… OPTIONS πŸ’…

  • --list β€” prints a summary of the data contained in the dump. a little sneak peek, a vibe check, if you will. ✨
  • --quiet β€” suppresses the display of progress bars during an import. this one is implied when the output isn't going directly to a terminal, so if you're piping stuff around, she's already quiet. 🀫
  • --originalid cfname β€” places the original ticket organization and ID into a global custom field with the given name. and if no global ticket custom field with that name exists in the current database? she'll just create one for you. iconic behavior honestly. πŸŽ€
  • --exclude-organization β€” ordinarily certain records (groups, queues, the --originalid custom field) include the organization name of the original RT instance. use this option to suppress that behavior and use the original name directly. no organization, just vibes. πŸ¦‹
  • --ask β€” prompts for action when an error occurs inserting a record into the database. this can often happen when importing data from very old RTs where some attachments (usually spam πŸ™ˆ) contain invalid UTF-8.

The importer will pause and ask if you want to ignore the error and continue on, or abort (potentially to restart later). Ignoring errors will result in missing records in the database, which may cause database integrity problems later. If you ignored any errors, you should run rt-validator after import. πŸ‘€

  • --ignore-errors β€” ignore all record creation errors and continue on when importing. this is equivalent to running with --ask and manually typing ignore at every prompt. you should always run rt-validator after importing with errors ignored.
This option can be dangerous and leave you with a broken RT! 🚨 bestie I am begging you, be careful.
  • --dump class[,class] β€” prints Data::Dumper representations of the objects of type class in the serialized data. this is mostly useful for debugging. ngl it only works in conjunction with --list. πŸ”
  • --no-auto-commit β€” don't auto commit to database. when this flag is used, it will commit only once for each data file. this could boost performance in some cases. ⚑

🌈 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 with no data in it. πŸ’€

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

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

The normal make initdb step will not work because it also inserts core system data. so don't do that one, do the other one. periodt. πŸ’…


and that's the whole page, bestie β€” you ate that. mwah. 🫢 this gorgeous little manual page is part of Request Tracker Reference, shipped with perl v5.38.2 and dated 2023-10-29. go forth and import responsibly. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from