Skip to content
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

Closed

Conversation

deepthi
Copy link
Member

@deepthi deepthi commented Feb 12, 2019

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

… first pass at implementing xtrabackup. add allow_master option to vtctl backup commands

Signed-off-by: deepthi <[email protected]>
@deepthi deepthi requested a review from sougou as a code owner February 12, 2019 20:41
@@ -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 ")
Copy link
Contributor

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?

Copy link
Member Author

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.

Copy link
Member Author

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.

…rary with execCommand because xtrabackup's tar file format is weird

Signed-off-by: deepthi <[email protected]>
@deepthi deepthi changed the title WIP: refactor backup/restore to plugin xtrabackup WIP: xtrabackup implementation + allow_master Feb 28, 2019
@rafael
Copy link
Member

rafael commented Feb 28, 2019

Could we rebase this branch with: #4653 please?

So we don't see diffs from that PR in here.

@deepthi
Copy link
Member Author

deepthi commented Mar 2, 2019

Moved the xtrabackup implementation to its own PR: #4695

@deepthi
Copy link
Member Author

deepthi commented Mar 3, 2019

This PR is superseded by #4653 #4695 and #4699

@deepthi deepthi closed this Mar 3, 2019
@harshit-gangal harshit-gangal deleted the ds-xtrabackup-allow-master branch July 17, 2020 16:39
systay pushed a commit that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants