Skip to content

Database migrations and restore with filestore #383

Answered by pedrobaeza
pleirb asked this question in Q&A
Discussion options

You must be logged in to vote

You can dump your DB from the instance with:

docker-compose run --user root -l traefik.enable=false --rm -v /root/:/mig odoo bash -c 'pg_dump -Fc -v -U odoo -f /mig/db.dump $PGDATABASE'

and then restore it in other instance:

docker-compose run -l traefik.enable=false --user root --rm -v /root/:/mig odoo bash -c 'pg_restore --no-owner -d $PGDATABASE /mig/db.dump'

and you can also transfer the filestore copying/rsyncing the files in the associated volume (normally in /var/lib/docker/volumes/).

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@pleirb
Comment options

@pedrobaeza
Comment options

Answer selected by pleirb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants