Open niclaslindstedt opened 4 years ago
As the the demos and logs are placed in docker volumes there is no "clean" way of getting them. There seems to be two options:
docker exec
in the container and compressing the logs and then getting them out with docker cp
but this requires the container to be running/var/lib/docker/volumes/nquakesv_*
but that needs the backup process to have super user rightsWhat do you guys like best?
The clean way imo is to have a backup service specified in the docker-compose.yml that mounts the media folders AND a backup folder from the host, and copies the files over there.
https://github.com/gfelisberto/nquakesv-backup
I already updated my local docker-compose to include this but wanted to discuss better before going forward.
Currently I am doing a rsync for the demos because the files are not changed. But for the logs as we may get a new container with new files and the same name I opted for doing a full tar.bz2
I think the right thing to do here would be to use bind mounts in the docker-compose.yml, instead of volumes. E.g.
- ./nquake/logs:/nquake/logs
- ./nquake/media:/nquake/media
- ./nquake/demos:/nquake/demos
So, whereever the user chooses to put his docker-compose.yml, demos, logs and media would live right alongside of it.
Another idea is to add extra container to export data outside of the stack, for example periodic rclone or synthing.
I am writing the perfect backup image for this.
and how it's going? ;)
I'm done with the image. I just need to add it to this project :)
Backup all the demos & logs that are generated.