Questions about migration Indico 2.3.5 to 3.x

Dear Indico developers,

I have some questions regarding the migration of Indico 2.3.5 to 3.x:

I would like to do a fresh installation of Indico 3, but then first do some tests before migrating our Indico 2.3 data. To migrate the Indico 2.3 data to the Indico 3 server that has already a database setup with indico db prepare and has been used for testing, can I just do the following?

su - postgres
dropdb indico
pg_restore -C -d postgres indico.sql

Assuming indico.sql is the output file from

pg_dump -U postgres -d indico > indico.sql

on the old Indico 2.3 server.

I guess I do not need to set the ownership of the database or create database extensions after using pg_restore, since these should be restored from the dump.

Then deleting everything in /opt/indico/archive and copy the old data there.

Is there anything else to consider? E.g. emptying cache/tmp folders?

Thanks a lot!


Hi, looks fine!

I’d rather run the pg_restore as the indico user to make sure there are no ownership screwups, but generally what you do should work as well since the dump should contain everything important including the correct ownership (it would only be a problem when using different postgres users on the different systems).

FWIW, this is how I would do it:

su - postgres -c 'dropdb indico'
su - postgres -c 'createdb -O indico indico'
su - postgres -c 'psql indico -c "CREATE EXTENSION unaccent; CREATE EXTENSION pg_trgm;"'

and then as the indico user:

pg_restore -d indico -O /path/to/indico.dump

For creating the backup I’d use pg_dump -Fc -f /tmp/indico.dump indico to use the custom postgres dump format; it’s compressed and AFAIK also more efficient (and you don’t need a raw readable SQL file anyway if you don’t plan to modify any data in the sql dump)

Yes, that’s a good idea.

Thank you also for this!

I guess you mean pg_restore -d indico -O /path/to/indico.dump ?

Yes… that happens when copying commands from your own shell history and forgetting to fully change it :wink: