databacker / mysql-backup

image to enable automated backups of mysql databases in containers
636 stars 178 forks source link

Retention settings do not work #310

Closed sonor3000 closed 4 months ago

sonor3000 commented 4 months ago

I run the latest databack/mysql-backup image via docker compose and all is fine so far, only pruning old backup does not work. The RETENTION environment variable seems to have no effect.

No matter if I specify e.g. 15c or 1d or whatever for the RETENTION environment variable, old backups are not pruned.

Is pruning old backups not working or what am I doing wrong?

If I enable debug loggin also nothing is shown regarding pruning old backups.

deitch commented 4 months ago

Are you using image: databack/mysql-backup (or databack/mysql-backup:latest, which is the same thing)?

The latest tag points to the most recent actual semver release. Since the most recent semver has not yet been released (currently v1.0.0-rc4), it points to the most recent bash-based version, which does not have the pruning capabilities. The rebuilt-from-the-ground version does. You can try with databack/mysql-backup:v1.0.0-rc4 or wait for it to be released as v1.0.0. Some last API things are left to clean up.

Be aware that it is a complete rewrite, and per semver rules, v1.x need not be compatible with v0.x. Pretty much every capability is there, and many of the env vars carry over, but not everything is identical.

sonor3000 commented 4 months ago

Thanks @deitch I switched to latest which I normaly avoid. Before I used v0.12 but I saw that much things have changed since the last official stable release.

With :latest I now have the problem that I can not connect to the database server, access denied. I did only change the image tag in the docker-compose file, the rest worked before. But I saw that there are still issues regarding this problem, I'll take a look...

Anyway, thanks for pointing me in the right direction with the different image versions!