-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
WIP: xtrabackup implementation + allow_master #4614
Conversation
… first pass at implementing xtrabackup. add allow_master option to vtctl backup commands Signed-off-by: deepthi <[email protected]>
Signed-off-by: deepthi <[email protected]>
@@ -61,6 +61,8 @@ func init() { | |||
|
|||
func commandBackup(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag.FlagSet, args []string) error { | |||
concurrency := subFlags.Int("concurrency", 4, "Specifies the number of compression/checksum jobs to run simultaneously") | |||
allowMaster := subFlags.Bool("allow_master", false, "Allows backups to be taken on master. Warning!! If you are using the builtin backup engine, this will shutdown your master mysql for as long as it takes to create a backup ") |
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.
can we make it so that allow_master is a no-op if it would be harmful?
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.
how would we define "harmful"? If there is a way to define that we can look into implementing it.
The idea behind the proposal in the original issue (#4557) was that the user is explicitly overriding the constraint that dis-allows backups from master.
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.
@acharis One check I implemented is that even if allow_master is specified with a BackupTablet command, we will first try to do a backup using one of the other types of vttablet(REPLICA/RDONLY/SPARE). Only if none of those is available we will use MASTER. I know this isn't what you asked, but FYI.
Signed-off-by: deepthi <[email protected]>
…rary with execCommand because xtrabackup's tar file format is weird Signed-off-by: deepthi <[email protected]>
Could we rebase this branch with: #4653 please? So we don't see diffs from that PR in here. |
Signed-off-by: deepthi <[email protected]>
Moved the xtrabackup implementation to its own PR: #4695 |
Refactor backup/restore to abstract out the backup engine.
Current logic where we do all the work is now called
builtin
.Initial support for
xtrabackup
backup and restore. Tests TBI.Add allow_master command line option to vtctl Backup and BackupShard commands.
All feedback and suggestions on code structure, coupling etc. are welcome.
cc @derekperkins @dkhenry @demmer @rafael