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

Adding .my.cnf to disable column-statistics backup #10509

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

misilot
Copy link
Contributor

@misilot misilot commented Jan 13, 2022

Fixes #10176

The .my.cnf file is copied to /root/.my.cnf for each
Dockerfile that exists

Description

Adds a mysql configuration file that disables column-statistics for mysqldump, which allows the snipe-it backup to run as expected.

Fixes # 10176

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Try running backup from existing container, to a mysql 5.x database server. It fails. Add the .my.cnf to /root with the following contents:

[mysqldump]
column-statistics=0

Run docker-compose exec snipe-it sh -c 'php artisan snipeit:backup', backup succeeds.

Checklist:

Fixes snipe#10176

The ```.my.cnf``` file is copied to ```/root/.my.cnf``` for each
Dockerfile that exists
Copy link
Collaborator

@uberbrady uberbrady left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely love it! Thank you.

@uberbrady
Copy link
Collaborator

@snipe should we try and merge this not only to develop, but to 'master' as well? I don't like the idea that some of our Docker users can't really back up effectively.

@misilot
Copy link
Contributor Author

misilot commented Jan 13, 2022

@uberbrady, do you want me to make a PR to master, or would you just prefer to chery-pick it into master afterwards?

@uberbrady
Copy link
Collaborator

Let's see what the boss says - but it's only one commit so I'm fine with cherrypicking.

@snipe
Copy link
Owner

snipe commented Jan 13, 2022

This seems fine - if you want to open a PR against master as well, I'll take it.

@snipe snipe merged commit 4e3fd6b into snipe:develop Jan 13, 2022
@snipe
Copy link
Owner

snipe commented Jan 13, 2022

(I am trying to get an RC out in the next day or so, so trying to limit changes as much as we can, but we already have a bunch of PRs to get through.)

@snipe
Copy link
Owner

snipe commented Jan 13, 2022

Awesome, thanks!

@stefanp2021
Copy link

Hi!
Please excuse my question, can I already take advantage of this in my production environment?
Thanks a lot!
Best regards!
Stefan Pirker

@misilot
Copy link
Contributor Author

misilot commented Jan 17, 2022

Yes you could add this your existing running container. The easiest would probably to be to add it to your docker-compose.yml as a new volume mount point

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

Successfully merging this pull request may close these issues.

4 participants