containers / podman

Podman: A tool for managing OCI containers and pods.
https://podman.io
Apache License 2.0
23.45k stars 2.38k forks source link

Volumes auto-backup #24201

Closed CyberFox001 closed 5 days ago

CyberFox001 commented 5 days ago

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

Suggestion B: At container level

Work the same way as suggestion A, except

Backup restoration

Notes

Have you considered any alternatives?

Additional context

Add any other context or screenshots about the feature request here.

Luap99 commented 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...

CyberFox001 commented 5 days ago

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.

rhatdan commented 5 days ago

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.

Luap99 commented 5 days ago

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.