-
Notifications
You must be signed in to change notification settings - Fork 12
Updating libretime's database from 9.x to 10.x
It is possible that you were running libretime using an older version of postgres. If your cluster is in version 9.x (run pg_lsclusters
to check version), it is possible to import your data to libretime-docker
which uses postgres version 10 (default on Ubuntu 18.04).
Your first action will be to save (dump) all your 9.x data in a file:
-
su - postgres
-
pg_dump airtime -f backup.dump
The file backup.dump
will contain everything you need to reinstate your database with all the needed information.
Once your file in on the host machine (and in the current dir), start a libretime-docker container (go through the installation steps if need) and run docker cp backup.dump libretime:/var/lib/postgresql/backup.dump
afterwards. This assumes that the container's name is libretime.
At this point, you have your backup.dump
file ready. What you want to do is:
-
docker exec -it libretime bash
to get inside the container -
su - postgres
to login as postgres -
dropdb airtime
self-explanatory -
createdb airtime
recreate empty airtime db -
pg_restore -d airtime backup.dump
to restore your database
At this point you should be able to refresh your airtime web tab and see everything has been imported.