Skip to content

Migrating group data

Karrot has the facility to export group data from one instance and import it on another instance. It is intended as a migration tool for migrating whole groups to new instances.

Important info

  • it is a one-time export/import, if you try and re-import it will error because the group name is taken (you could rename or remove the group manually though and a re-import should work again)
  • the database ids are not preserved, this is so you can import the group into an instance which has already used those ids
  • if a user already exists on the destination, that existing user will be used and their account data not imported
  • the export gives you an encrypted file which you have to copy yourself to the machine the other instance is running on, you should copy the encryption password separately to avoid others gaining access to the data

It currently does NOT migrate:

  • messages
  • history
  • issues
  • applications
  • ... and others

See the excluded_models variable in exporter.py for the full list.

If you want an export that includes those other content types please contact us as we will likely add functionality for that.

Export the data from the old instance

Or ask the existing instance admin to create you an export.

bash
python -m karrot.cli manage export --groups <ids>

It'll export a file named export.tar.xz.gpg.

or specify the filename

You can optionally specify a file path to export to, just be sure it ends with .tar.xz.gpg

🧑‍🏫 Important

It'll print out an encryption password in the terminal. This is the only time you will see it!

Keep it handy for when you need to do the import.

Transfer the file to the other instance

If using Co-op Cloud you can use this command to copy a local file over:

bash
abra app cp <domain> <filename> app:/

Run the import

bash
abra app run <domain> app python -m karrot.cli manage import /<filename>

It'll ask you for the password. If successful it'll print Import complete at the end.