Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Howto]: Use mysqldump-secure in non default PHP containers when running more than one PHP version. #985

Open
7 of 8 tasks
BWBama85 opened this issue May 5, 2023 · 1 comment

Comments

@BWBama85
Copy link

BWBama85 commented May 5, 2023

Have you already checked elsewhere?

What are you struggling with?

When using multiple PHP versions, mysqldump-secure does not work in the non default containers without editing /etc/mysqldump-secure.cnf

After manually editing mysqldump-secure.cnf, mysqldump-secure works but only backs up inside the container and does not back up to the host folder.

mysqldump-secure only works inside the default PHP container.

What have you tried already?

Editing mysqlsecure.cnf but still does not backup to host non container backup directory.

What is your goal?

To be able to use mysqldump-secure inside any php container and not just the default php container.

@BWBama85 BWBama85 changed the title [Howto]: [Howto]: Use mysqldump-secure in non default PHP containers when running more than one PHP version. May 5, 2023
@userwiths
Copy link

userwiths commented Jul 10, 2023

Hey, just took a look on my local setup. It seems to be missing in the docs, but according to this piece of code, you can set the variables

MYSQL_BACKUP_USER=user_to_use_for_backup
MYSQL_BACKUP_PASS=your_password_for_that_user
MYSQL_BACKUP_HOST=mysql

in the .env file in the devilbox directory.
After that restart the containers and try again. Locally it worked for me, hope it works for you too.
Might look into opening a PR for the docs later, but not sure if I will remember.

ALSO for the issue of them not showing in the host's folder, but only in the container.
It seems this is missing from the multi-php's docker-composer.override.yml. I added it to my other php containers, and can verify that now the backups are showing in the host's folder too.
It should be a part of volumes: key.
- ${HOST_PATH_BACKUPDIR:-./backups}:/shared/backups:rw${MOUNT_OPTIONS}

Image for reference.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants