MySQL restore error on an "all" database dump #301

Closed
opened 2020-04-22 16:52:27 +00:00 by witten · 2 comments
Owner

What I'm trying to do and why

Dump all MySQL databases and then restore them with borgmatic, so I can backup all databases on a host (without specifying a particular named database), and then restore them all. Say, in the case of host failure.

Steps to reproduce (if a bug)

Run a borgmatic restore of a borgmatic MySQL 8 all database dump.

Actual behavior (if a bug)

Restoring errors with:

ERROR 3552 (HY000) at line 24: Access to system schema 'mysql' is rejected.

Expected behavior (if a bug)

All databases in the dump restore without error.

Other notes / implementation ideas

The best bet for a work-around may be to stop using --all-databases during the dump, and instead dump each database on the system that isn't mysql.

Thanks to Immanuel for reporting this!

Environment

borgmatic version: 1.5.1

borgmatic installation method: pip install -e

Borg version: 1.1.9

Python version: 3.7.3

Database version (if applicable): MySQL 8.0.19

operating system and version: Manjaro stable

#### What I'm trying to do and why Dump `all` MySQL databases and then restore them with borgmatic, so I can backup all databases on a host (without specifying a particular named database), and then restore them all. Say, in the case of host failure. #### Steps to reproduce (if a bug) Run a `borgmatic restore` of a borgmatic MySQL 8 `all` database dump. #### Actual behavior (if a bug) Restoring errors with: ``` ERROR 3552 (HY000) at line 24: Access to system schema 'mysql' is rejected. ``` #### Expected behavior (if a bug) All databases in the dump restore without error. #### Other notes / implementation ideas * https://bugs.mysql.com/bug.php?id=92675 * https://stackoverflow.com/questions/53103876/errror-3554-while-importing-a-sql-file * https://dba.stackexchange.com/questions/35081/any-option-for-mysqldump-to-ignore-databases-for-backup The best bet for a work-around may be to stop using `--all-databases` during the dump, and instead dump each database on the system that *isn't* `mysql`. Thanks to Immanuel for reporting this! #### Environment **borgmatic version:** 1.5.1 **borgmatic installation method:** `pip install -e` **Borg version:** 1.1.9 **Python version:** 3.7.3 **Database version (if applicable):** MySQL 8.0.19 **operating system and version:** Manjaro stable
witten added the
bug
label 2020-04-22 16:53:22 +00:00
Author
Owner

A fix for this is implemented in master, and will go out as part of the next release!

A fix for this is implemented in master, and will go out as part of the next release!
Author
Owner

Released in borgmatic 1.5.2!

Released in borgmatic 1.5.2!
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#301
No description provided.