-
This process # stop odoo if it's running
docker-compose stop odoo
# start backup and db
docker-compose up -d backup
# switch to some version
docker-compose exec backup restore --time TIME_IN_BACKUP_NAME --force
# ⚠️ DELETE PRODUCTION database
#docker-compose backup dropdb
# create new empty database
docker-compose exec backup createdb
# restore database
docker-compose exec backup sh -c 'psql -f $SRC/$PGDATABASE.sql'
# start odoo
docker-compose up -d All goes well until reloading the .sql file. There are lots of errors on the db container like "thing already exists" or "violates foreign constraint" and "invalid command" and such. Then in the end I get a ir.http KeyError on the odoo container (with the 500 Internal Server Error). Should I be running -i base somewhere in here? (like after createdb but before psql -f ...) (although I didn't immediately have success with this either). Or in general is there something I am missing? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
That's because you didn't uncomment the line with |
Beta Was this translation helpful? Give feedback.
That's because you didn't uncomment the line with
docker-compose backup dropdb
, which is commented on purpose because it's destructive.