-
Notifications
You must be signed in to change notification settings - Fork 87
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
Rotate Backups #44
Comments
Hi! I do kinda like the "batteries included" attitude of just including a rotation utility in the image itself. There's a few caveats, though:
Given all of the above, I quite like the |
Hy @jareware,
Can you please provide a little bit more information on your idea of Regards, |
Sorry, maybe I didn't quite catch that. I would say that "no", I don't think we should integrate
Yes, I would hope it worked exactly as If you do something simple (like If you want something fancy (like
But of course this could be packaged into a dedicated image:
Assuming your What do you think? |
Oh, and looks like there's also some solutions out there already, e.g. https://github.com/Glideh/docker-cron-rotate-backups |
Hi, thank you for point out that we are able to start arbitrary Docker containers. Indeed, this is a possibility to run The Regards, |
#46 was exactly what I had in mind! 🙇 Also https://github.com/jan-brinkmann/docker-rotate-backups looks really neat. Let's add an example to the README in this repo on how to use that? |
Thank you for merging! I will add an example the next days. |
Allright, let me know and let's cut a release after! |
One more point related to this came to my mind:
I will give an update soon. :) |
Recently, I found out that rotate-backups can be applied on remote directories. I have implemented that feature in the external container here: https://github.com/jan-brinkmann/docker-rotate-backups#remote-directories We can use this feature when we upload backups by means of SCP. If we would do this, rotate-backups does not have to be installed on the remote host where you transfer the backup to. Currently, rotate-backups must be installed. Thus, we can get rid of this restriction. In order to apply rotate-backups with the external container I propose to move docker-volume-backup/src/backup.sh Line 148 in 612e633
Does this make sense to you? |
Oh yeah, makes total sense; being able to run pre/post commands shouldn't depend on whether you're backing up locally or remote, they can be useful for both. 👍 |
Hey @jareware,
things addressing rotate backups got a little bit messy. That's why I open this issue to summarize what we currently have and to discuss what we want to have.
v2.5.0
, we are enabled to upload backups by means ofscp
to a remote host and to make use ofPOST_SCP_COMMAND
in order to executerotate-backups
directly on that remote host. Here, we have to overhand the complete configuration, e.g.,POST_SCP_COMMAND: rotate-backups --daily 7 --weekly 4 --monthly 12 --yearly always /backup-directory
.rotate-backups
directly on the remote host where we upload our backup to by means ofscp
. Unlike in the first option, we have a default configuration that can be customized by environmental varibalesROTATE_DAILY
and so on.rotate-backups
directly inside the container on the directoy/archive
. A default configuration ist given by a.rotate-backups.ini
file . A custom configuration file can be mounted.Here are my thoughts about all these stuff:
rotate-backups
withoutscp
, we need an external solution (e.g., cron job outside of the container) or we Integrate rotate backups #36.POST_SCP_COMMAND
takes some arbitrary command, we cannot improve anything here. But Trigger rotate backups on remote host #42 provides most likely the most easy way to customize the configuration. These way can also used in Integrate rotate backups #36. That would result in a much better user experience.600MB
to900MB
(on ARM64). Installingrotate-backups
at runtime, if it has been activated, is not a nice idea because the package itself and some dependencies have to be downloaded everytime the container has been removed and restarted (e.g., bydocker-compose down
followed bydocker-compose up -d
).As far as I see, the first question that has to be answered is if #36 can be merged. In order to reduce the image size, maybe we can draw on #27. In the end, maybe we end up by the same image size we currently have.
What do you think?
Regards,
Jan
The text was updated successfully, but these errors were encountered: