Skip to content

Upgrade to postgres 12

We want to migrate our data to a new version of postgres. It seems there's no easy way to do this with separate containers and an external data volume.

The procedure we'll follow is:

  1. Create a new volume and new service for postgresql12
  2. Log in the VM and dump the database to a backup file
  3. Load this backup file into the postgresql12 database
  4. Remove the old postgresql service from the playbook and adjust the new postgresql service (ports)

Steps 2 and 3 were made manually.

This commit is step 4.

I had also to include the remove-orphans flag because of the error while running the playbook locally:

fatal: [webserver]: FAILED! => {"changed": false, "errors": [], "module_stderr": "Found orphan containers (internasus-database) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.\nRecreating internasus-database-postgresql12 ... \nHost is already in use by another container\n\u001b[1A\u001b[2K\nRecreating internasus-database-postgresql12 ... \n\u001b[1B", "module_stdout": "", "msg": "Error starting project Encountered errors while bringing up the project."}

Part of #45 (closed)

Merge request reports