RT 5.0.5 Documentation

rt-importer

Go to latest version →

NAME

rt-importer - Import a serialized RT database on top of the current one

SYNOPSIS

    rt-importer path/to/export/directory

This script is used to import the contents of a dump created by rt-serializer. It will create all of the objects in the dump in the current database; this may include users, queues, and tickets.

It is possible to stop the import process with ^C; it can be later resumed by re-running the importer.

Certain records (notably queues and groups) will have their original Organization name prepended to them on import. This is primarily to avoid duplicate names (for example importing a General queue into an RT that already has one would otherwise cause a name collision error). If you are confident you won't have any name collisions in queues or groups, you may suppress this behavior by passing the --exclude-organization flag to rt-importer.

OPTIONS

--list

Print a summary of the data contained in the dump.

--quiet

Suppresses the display of progress bars during an import. This option is implied when the output isn't going directly to a terminal.

--originalid cfname

Places the original ticket organization and ID into a global custom field with the given name. If no global ticket custom field with that name is found in the current database, it will create one.

--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.

--ask

Prompt 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!

--dump class[,class]

Prints Data::Dumper representations of the objects of type class in the serialized data. This is mostly useful for debugging.

Works only 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.

--batch-user-pricipals NUMBER =item --batch-group-pricipals NUMBER

The number of user/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, meaning 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 is for cloned serialized data only.

CLONED DATA

Some dumps may have been taken as complete clones of the RT system, which are only suitable for inserting into a schema with no data in it. You can setup the required database state for the receiving RT instance by running:

    /opt/rt5/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.

← Back to index