Can no longer disable MySQL tablespaces #1324
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
borgmatic-collective/borgmatic#1324
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
mysqldump needs extra permissions to dump tablespaces. Prior to 2.1.6 you could disable them using --no-tablespaces if you don't use tablespaces to avoid needing extra permissions on the backup user, but this no longer works in 2.1.6 because it forces --all-tablespaces. This causes every run to output:
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
It's not fatal, it's just one command of mysqldump's failing and the rest of the output continues, but it definitely looks fatal (and isn't something people should get in the habit of ignoring).
I experimentally tried editing hooks/data_source/mysql.py to put --all-tablespaces earlier to see if simply moving it before extra_options would fix it, but --all-tablespaces still overrides --no-tablespaces. I don't know if people normally run their backups with PROCESS permissions and don't run into this, but it'd be nice to have a way to disable --all-tablespaces so it can still be run cleanly without the process permission.
Steps to reproduce
mysql_databases:
Actual behavior
No response
Expected behavior
No response
Other notes / implementation ideas
No response
borgmatic version
2.1.6
borgmatic installation method
No response
Borg version
1.4.4
Python version
No response
Database version (if applicable)
mysql 8.0.46
Operating system and version
AlmaLinux 9.8
Thanks for filing this. It looks like it was caused by #1303. What I think I'll do as a solution is to add a database-level configuration option to disable dumping of tablespaces. Then you wouldn't need to use
extra_optionsfor this, and you could just disable dumping of tablespaces directly.This is implemented in main and will be part of the next release! The new option to disable this is just
tablespaces: falsein your database config. I also added similareventsandroutinesoptions, and added all of these to the MySQL hook as well.