Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add backup service #1

Open
niclaslindstedt opened this issue Feb 22, 2020 · 8 comments
Open

Add backup service #1

niclaslindstedt opened this issue Feb 22, 2020 · 8 comments

Comments

@niclaslindstedt
Copy link
Collaborator

Backup all the demos & logs that are generated.

@gfelisberto
Copy link
Contributor

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:

  1. Doing a 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
  2. Getting the logs directly from /var/lib/docker/volumes/nquakesv_* but that needs the backup process to have super user rights

What do you guys like best?

@niclaslindstedt
Copy link
Collaborator Author

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.

@gfelisberto
Copy link
Contributor

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

@eb
Copy link

eb commented Sep 24, 2020

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.

@nvtkaszpir
Copy link

Another idea is to add extra container to export data outside of the stack, for example periodic rclone or synthing.

@niclaslindstedt
Copy link
Collaborator Author

I am writing the perfect backup image for this.

@nvtkaszpir
Copy link

and how it's going? ;)

@niclaslindstedt
Copy link
Collaborator Author

I'm done with the image. I just need to add it to this project :)

https://github.com/niclaslindstedt/docker-backup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants