docker-mysql-cron-backup icon indicating copy to clipboard operation
docker-mysql-cron-backup copied to clipboard

Questions about database name variables

Open sky22333 opened this issue 1 year ago • 2 comments

Hello, this is a great project, but I have a question:

In the current documentation on GitHub , the variable for the database name is MYSQL_DATABASE However, in the documentation on Docker Hub , the variable for the database name is MYSQL_DB Which one should I use? Or can both be used?

sky22333 avatar Sep 15 '24 18:09 sky22333

hello, I think you may use the varaible MYSQL_DATABASE looking in the script backup.sh

I have another question related to the MYSQLDUMP_OPTS= how can I add few options, does it needs quotes or brackets ?

If i want do something like this does I need put

MYSQLDUMP_OPTS=--no-tablespaces --default-character-set=utf8mb4
MYSQLDUMP_OPTS="--no-tablespaces --default-character-set=utf8mb4"
MYSQLDUMP_OPTS=[--no-tablespaces --default-character-set=utf8mb4]

I have seen in the script backup.sh the option --single-transaction is yet here

rodinux avatar Sep 23 '24 10:09 rodinux

HI,

Regarding the database name variable you can use both. The backup and restore scripts look first for MYSQL_DATABASE and it that's not set, it will look for MYSQL_DB.

Regarding MYSQLDUMP_OPTS, you have to pass a string without quotes (option 1 in you message) as you see in the example of the README

The arg --single-transaction is there because it is mandatory to make the script work

Regards

fradelg avatar Sep 29 '24 09:09 fradelg