YOLO
Update from 0.41 not possible
We are using version v0.41.0 and want to upgrade to the latest version – v0.52.0.
However, we are encountering issues with the database. We cannot restore the backup into the new database, and we are also unable to use the existing database with the new Docker image.
In version v0.41.0, you were using image: twentycrm/twenty-postgres-spilo:${TAG:-latest}. In the new version v0.52.0, you're using image: postgres:16.
If we keep the existing database and volume, we get the following error: db-1 | initdb: error: directory "/var/lib/postgresql/data" exists but is not empty.
If we delete the volume and import the database dump into the new database, we get the following errors:
psql:/db_backup_2025_05_10_16_52.sql:23: ERROR: schema "core" already exists"
psql:/db_backup_2025_05_10_16_52.sql:32: ERROR: schema "metadata" already exists
psql:/db_backup_2025_05_10_16_52.sql:82: ERROR: extension "pg_stat_kcache" is not available
DETAIL: Could not open extension control file "/usr/share/postgresql/16/extension/pg_stat_kcache.control": No such file or directory.
etc.
We tried different options for creating and loading the dump. Some of them::
- "pg_dump -U postgres -d default > backup.sql" + "psql -U postgres -d default -f /backup.sql"
- "pg_dump -U postgres -d default --data-only > backup.sql" + "psql -U postgres -d default -f /backup.sql"
- "pg_dump -U postgres -d default > backup.dump" + "pg_restore -U postgres -d default -1 backup.dump"
- "pg_dump -U postgres -d default -Fc --data-only > backup.dump" + "pg_restore -U postgres -d default -1 backup.dump".
But all of these commands result in different errors.
3 replies