-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
RFC + Support of BACKUP and RESTORE statements #15274
Conversation
d35194b
to
19fb519
Compare
99e3e22
to
87fb787
Compare
We have a dependency problem preventing the plugins to be run, which blocks the Required "idc-jenkins-ci-tidb/build" CI.
OTOH we can't upgrade the plugin's dependency to 1.14.0 before this PR is merged, because this would cause the version mismatch error in the other way, and blocks other PRs. |
/run-all-tests |
@kennytm merge failed. |
/run-all-tests |
@kennytm merge failed. |
Take a rest. |
/merge |
/run-all-tests |
@kennytm merge failed. |
/merge |
/run-all-tests |
@kennytm merge failed. |
|
/merge |
/run-all-tests |
@kennytm merge failed. |
|
/merge |
/run-all-tests |
/run-cherry-picker |
cherry pick to release-4.0 in PR #16960 |
What problem does this PR solve?
Support running BR inside TiDB directly.
What is changed and how it works?
Recognize the new
*ast.BRIEStmt
in pingcap/parser#746, and forward to the library functions in BR. When we executeTiDB will spawn a new BR manager which backs up the database
tpcc
into the provided storage. The query blocks until backup completes. Returns an empty set on success:and returns an error on failure:
BRIE tasks must be executed sequentially. Currently, for simplicity, tasks are queued in the local server only. In the future we make the entire cluster share the same queue.
Use SHOW BACKUP / SHOW RESTORE in another session to list the tasks
Use
KILL TIDB QUERY n
to cancel a task.Check List
Tests
a simple tableW=30 TPC-C database (2 GB), drop it, and run restore from the archive.Code changes
Side effects
Related changes
Release note
Added the RESTORE statement to restore from the backup archive.(don't include into release note yet, do so after the entire feature is complete.)