forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backup: Allow for upgrade safe backups (vitessio#13449)
* backup: Allow for upgrade safe backups This adds functionality so that it's possible to use `Backup` and `BackupShard` and enforce that the backup created is safe to be used for upgrading MySQL. Signed-off-by: Dirkjan Bussink <[email protected]> * Fix test output Signed-off-by: Dirkjan Bussink <[email protected]> * backup: Add version number to manifest This adds the version number and upgrade safe state to the manifest. If these values are set, they are also validated on restore. For backwards compability we always allow still empty version numbers. Signed-off-by: Dirkjan Bussink <[email protected]> * Move restart logic into xtrabackupengine This already happens correctly with the shutdown for the builtin engine, where we're shutdown twice for `vtbackup` then. With this move we also properly honor the `UpgradeSafe` flag if the path is called through `Backup` or `BackupShard` vtctld commands. Signed-off-by: Dirkjan Bussink <[email protected]> * backup: Rework version detection It's not guaranteed that MySQL will always be up when doing a restore, this is shown in some of the failing tests with the changes so far. This means we need a way to get the MySQL version without having it running. We can though rely in `mysqlctld` being up. So this adds a new RPC to retrieve the version number through invoking the binary. This ensures we still get the right version also if we're running from the tablet as we'd execute the RPC. We also have less of a versioning issue here, as the vttablet + mysql are always upgraded together and the new mysqlctl is injected into the mysql container if needed so we don't have a version mismatch. So it's safe to do this in one step. Also decided to make the upgrade safe an explicit flag for `vtbackup` as well since overloading the existing flag was wonky and not really what we'd want. This makes it more explicit and safe. Signed-off-by: Dirkjan Bussink <[email protected]> * Rename function Signed-off-by: Dirkjan Bussink <[email protected]> --------- Signed-off-by: Dirkjan Bussink <[email protected]>
- Loading branch information
Showing
30 changed files
with
2,892 additions
and
1,315 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.