Closed CyberFox001 closed 5 days ago
This sounds way out of scope for podman, backups in general can be done is so many ways that there is not one size fits it all solution. Trying to implement something like this in podman will just lead to endless churn and maintenance headaches because every users wants something else.
In particular doing full backups every time is just a huge waste of space and then you need to worry about running our of disk and some kind of retention policy when we delete old backups, etc...
The goal is not to provide every possible ways of doing backup. Only a simple one.
Like updating a container could be done in so many ways, but podman auto-update
provide a simple one.
We can already use the commands podman volume export
to manually get the data of a volume. But we still need to stop the container who use this volume first. This feature request suggest to provide a way of doing it automatically, similarly to auto-update.
Seems like this could be written in a script to pause or stop a container; export the volume and restart the container. Not something needed to be done in core Podman.
Only a simple one.
Well this is not how it works in practise, people will always ask for more and more. And this isn't super simple either.
Overall backups are super specialized depending on your work loads/environments, I do not think it is reasonable to try to abstract one specific way into podman.
Feature request description
Automate the backup of volumes data in a similar way of how auto-update work. Each backup is done regularly and the container(s) that use the volumes is (are) stopped before the backup and started after.
Suggest potential solution
Suggestion A: At volume level
io.containers.autobackup=periodicity
periodicity
can be:hourly
,daily
,weekly
, etcpodman auto-backup
is run, each container using a marked volume is stopped, the backup of the volume data is done to a destination directory then the stopped containers a restartedio.containers.backupdir=path
, where path is a host pathvolume_name/date_volume_name.tar
, wheredate
are in formateyear-month-day-hour-minute
podman-auto-backup.service
andpodman-auto-backup.timer
are availableSuggestion B: At container level
Work the same way as suggestion A, except
podman auto-backup
is run, each marked containers are stopped, all their volumes data are saved to a destination directory then the stopped containers a restartedcontainer_name/volume_name/date_volume_name.tar
, wheredate
are in formateyear-month-day-hour-minute
Backup restoration
podman volume import
podman run
orpodman volume create
to restore data after the volume creation or before the container runNotes
--requires
) are stopped before--requires
optionHave you considered any alternatives?
Additional context
Add any other context or screenshots about the feature request here.