Closed mictadlo closed 5 years ago
Hi @mictadlo it does not, in my experience (but I only run GNU/linux)
If you are using an explicit volume for the postgres database, then the data will be persisted in that directory.
If you are not using an explicit volume, then the volume should be persisted in the docker directory and used automatically.
I would guess that this is another OSX oddity.
I am running OS X as host and Linux Mint is installed in VirtualBox. How would I need to change the docker-compose.yml
to explicitly be able to use volume for postgres database in order persist the data?
https://github.com/GMOD/docker-apollo/blob/master/docker-compose.yml#L35 should be sufficient.
Are you running docker inside the Linux Mint guest VM?
Yes, I am running docker inside Linux Mint 18 VM.
/srv/docker/postgresql:/var/lib/postgresql
as describe here?...
I watched this video and the solution was docker run --rm --volumes-from john1 -v $(pwd):/backup busybox tar cvf /backup/john2.tar /john
. Probably to backup the database it would be necessary to dump it somehow.
As for backing up the database, it is much simpler to do something like:
$ docker exec -it my-postgres-image-id pg_dump -U postgres | gzip > my-backup.sql.gz
to dump the database. If you are even braver, you could just backup your mounted volume directory, which should work in theory, but I would only do that with the image turned off (just like backing up a regular postgres instance, wouldn't want to copy possibly mid-write, and corrupted files)
Hi @erasche and @nathandunn, How is it possible to avoid that
docker-compose down
deletes Organism?Thank you in advance,
Mic