After doing
docker-compose up
and adding lots of stuff to the database etc, I stupidly did a
docker-compose down
to stop the dockers from running. Just found out it actually removes it all.
Is there a way to recover from this and get back the data containers?
FYI This is the config of the datastore in docker-compose.yml:
services:
jira_datastore:
image: busybox
volumes:
- /data
entrypoint: echo "PSQL Data"
I was able to recover the data, so it indeed is possible, in some cases to retrieve the data.
As mentioned in the question, I had a datastore which points to /data
By doing compose-up again and after this moving the data from the old to the new volume I got everything back!
This is not possible :-(.
Next time do docker-compose stop
to stop but not remove the containers. You could also save the data in a map shared on your host computer to make the data persistent, for more info on this: https://docs.docker.com/engine/tutorials/dockervolumes/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With