The current image tag based selection approach is great for a quick setup.
However, we've been running in a few instances with 'ghost' images, where a previously deployed postgres:16 container will no longer be included in the backup, because a newer container has been deployed with the same tag, but newer minor version. Even tagging the specific version may break as docker image tags are overwritable by design.
A flexible approach would be selecting containers based on a simple label like e.g. auto-backup=mysql, which would also tell the script which backup provider to use. Since labels won't change when a container's image becomes stale, this method would keep working indefinitely.
The current image tag based selection approach is great for a quick setup.
However, we've been running in a few instances with 'ghost' images, where a previously deployed
postgres:16container will no longer be included in the backup, because a newer container has been deployed with the same tag, but newer minor version. Even tagging the specific version may break as docker image tags are overwritable by design.A flexible approach would be selecting containers based on a simple label like e.g.
auto-backup=mysql, which would also tell the script which backup provider to use. Since labels won't change when a container's image becomes stale, this method would keep working indefinitely.