-
Notifications
You must be signed in to change notification settings - Fork 101
backup,restore: support backing up / restore system databases #1048
Conversation
/run-integration-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest LGTM
Co-authored-by: kennytm <[email protected]>
/run-integration-tests |
Should you add this into the objective and and let the testing cover it? |
@IANTHEREAL Please make it clear to customers. |
Done, a single value test shows that GLOBAL_VARIABLES can be restored. However, note this PR is a workaround for backup / restoring user tables created in |
/lgtm |
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by writing |
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 04e0887
|
We should make it clear. Because once you released it, users will rely on this feature. |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-4.0 in PR #1077 |
Signed-off-by: ti-srebot <[email protected]>
cherry pick to release-5.0 in PR #1078 |
@SunRunAway I added a warning over restoring system tables in the document. cc @3pointer Please check whether it is necessary. |
If the system table cannot be restored correctly (referring to the system table similar to mysql.tidb, not the user data table under the mysql database), then there is no need to provide recovery methods to avoid misuse by users and affect their business |
If the system table cannot be restored correctly, why you backup them, why you implemented this feature by this pull request? |
What problem does this PR solve?
#872 and #679.
But this doesn't allow restore stats -- because the table IDs of the stats backed up are old table IDs, we need more efforts to rewrite them to make them take effect after the restoration.
What is changed and how it works?
This PR basically implemented #679 (comment), with some difference:
RENAME TABLE temp.xxx TO mysql.xxx
would be used, for effectively restoring user tables created inmysql
schema.-f
(the table filter) flag. Users must specify each table they want to restore by the table filter syntax (e.g.br restore full -f '*.*' -f '!mysql.*' -f 'mysql.usertable'
to restoremysql.usertable
).Check List
Tests
Related changes
Release Note
mysql
schema.