fradelg / docker-mysql-cron-backup

Docker image to backup all your databases periodically
Apache License 2.0
305 stars 111 forks source link

MAX_BACKUPS and multiple databases issue #24

Closed david-fanin closed 5 years ago

david-fanin commented 5 years ago

Hello,

First of all, thanks for your work!

I just tried your image with the environment variable MAX_BACKUPS set to 1. However, I have two databases, and at the end of the backup, the first dump of the first database is deleted. Is it possible to update your script to keep one backup by database and not one backup?

Thanks.

fradelg commented 5 years ago

I would recommend to use a single DB per container but I have modified the script slightly in order to preserve MAX_BACKUPS as you suggest.

The only caveat is that when the number of databases changes it will maintain more backups than expected. However, this should be fixed in the future backups.

Test the image tagged as develop to check it works as expected.

Regards

david-fanin commented 5 years ago

Hello,

Thanks for you reply and modification. Indeed, this is a case that I should meet with a small number of my websites.

I just tried the version "develop" and it seems to work! I pass a few days to be sure and come back to you to confirm.

See you soon!

david-fanin commented 5 years ago

Hello,

It works well as expected!

Is it now possible to merge the change into the master branch?

Thanks.