Migrate from `twentycrm/twenty-postgres` to `twentycrm/twenty-postgres-spilo`

Hi all! I just noticed the description in dockerhub for twentycrm/twenty-postgres mentions that this is now deprecated and we should be using twenty-postgres-spilo instead. Is it safe to switch out the image in the deployment, while retaining the same storage and environment vars? Or will this require backing up the DB, and restoring to the new postgres-spilo server? TIA!
7 Replies
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
GitHub
Begin moving to postgres spilo + adding pgvector by FelixMalfait · ...
We will remove the twenty-postgres image that was used for local development and only use twenty-postgres-pilo (which we use in prod), bringing the development environment closer to prod and avoidi...
ɃØĦɆᵾS
ɃØĦɆᵾS3mo ago
I'd wait when new version comes out as right now it's still work in progress and not everything has been migrated to spilo
charles
charles3mo ago
yes, let's wait for now! I would recommend to make a dump of your data and to restore it (pg_dump to dump, psql to restore) but let's wait for 0.33
Skyfox675
Skyfox675OP3mo ago
Thank you both!
John
John2mo ago
Curious @Skyfox675 if you migrated yet and if you saved the steps you completed
Skyfox675
Skyfox675OP2mo ago
No I haven't migrated yet unfortunately life has gotten in the way Starting on this migration tonight @John I can update when/if I"m successful 😬
John
John2mo ago
Using Dockercompose, these steps worked for me: 0. Create backup 1. PG Dump All: docker exec -it <db_container_name_or_id> pg_dumpall -U <postgres_user> > databases_backup.sql 2. In dockercompose disable migrations on both server and worker 3. Spin up spilo 4. Connect to spilo docker exec -it <spilo_container> bash and restore psql -U postgres < all_databases_backup.sql 5. Docker compose up and verify that you can login, read / delete records 6. Turn migrations back on

Did you find this page helpful?