fradelg/docker-mysql-cron-backup

Restore one DB from list

ay1man4 opened this issue · 1 comments

Hi,

In current configuration for auto restore during intial docker startup, restore script will restore all databases configured in environment variable MYSQL_DATABASE which is defaulted to --all-databases
If we set INIT_RESTORE_LATEST, during startup it will check MYSQL_DATABASE and restore all databases set on it.
The problem is if we want to restore one database only, if change MYSQL_DATABASE, this will impact the backup.

I suggest to add another environment variable for restore databases for example MYSQL_DATABASE_RESTORE, so backup will not be impacted and user will have control to restore any database just by changing the value of MYSQL_DATABASE_RESTORE and set the flag INIT_RESTORE_LATEST.

I get what you mean. I will think about it but you can always run the container with the restore.sh as command to restore your specific DB and then backup the others. Please, check the documentation:

https://github.com/fradelg/docker-mysql-cron-backup#restore-using-a-compose-file