I’m having trouble understanding best practices for backing up Docker data volumes. Am I on the right track with what I’ve done below, or have I missed a method that would be much easier?
Issue Type: Trouble backing up docker data volume
Host OS Version/Build: Windows 10 Enterprise 10.0.14393
App Version: Docker Community Edition v17.06.2-ce-win27 (13194)
I’m currently running the bitnami MediaWiki stack using
docker-compose up -d with the yaml config file below. It’s functioning perfectly and Docker made that process pleasingly simple.
The configuration uses volumes to store persistent data. However, I’m having trouble figuring out how to backup the volumes to cloud backup. To accomplish this I’d like to be able to generate a compressed volume and send that over to a onedrive backup. I’d eventually like to automate the process and add incremental backups, but right now I’m just trying to get full backups working with manual steps.
In my search I’ve come across the Docker documentation on volumes. Despite this Stack Overflow answer the Docker volume docs no longer appears to address backups. I’ve found and tried out some docker containers who’s purpose is to backup and restore volumes. I’ve had the following issues:
- Duplicity appears to give an error wanting an extra argument
- This doesn’t appear to do anything?
Using Kitematic to
Enable Volumeand attempt to copy data using Windows 10 Host OS
- After doing this with both containers, the MediaWiki container is unable to find the SQL user on the MariaDB container. I’m not totally surprised by this, since the container OS is linux-based.
As you can see from my results, I’m not getting expected results from their tutorials. I think my issue is not using the Duplicity tool underlying both containers correctly. However, I’m not yet skilled enough with Docker to understand how to debug a container.
I’d really appreciate any guidance the community could provide.
version: '2' services: mariadb: image: 'bitnami/mariadb:latest' environment: - ALLOW_EMPTY_PASSWORD=yes volumes: - 'mariadb_data:/bitnami' mediawiki: image: 'bitnami/mediawiki:latest' labels: kompose.service.type: nodeport ports: - '80:80' - '443:443' volumes: - 'mediawiki_data:/bitnami' depends_on: - mariadb volumes: mariadb_data: driver: local mediawiki_data: driver: local