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

Allow backup on tablet master #2903

Closed
guidoiaquinti opened this issue Jun 1, 2017 · 5 comments
Closed

Allow backup on tablet master #2903

guidoiaquinti opened this issue Jun 1, 2017 · 5 comments

Comments

@guidoiaquinti
Copy link
Member

Opening this issue as per conversation in Slack.

Right now there isn't a workflow to recover from a scenario where:

  • there's only an active master in a shard (no active replicas)
  • there are no backups available for the shard and/or there are only backups "old enough" that master has purged binary logs containing GTIDs that the slave requires.

Afaik we can't trigger a backup on the master using Backup (as it's a master) and we can't change type MASTER -> REPLICA using ChangeSlaveType.

The only workaround that I see is to manually perform a backup on the master, rsyncing the data on the slave and restore replication.

@sougou
Copy link
Contributor

sougou commented Jun 1, 2017

Allowing this is generally useful. It will allow people to deploy vitess on partial clusters where the master need not be served by vitess.

@sougou
Copy link
Contributor

sougou commented Oct 28, 2018

@dweitzman suggested this workaround on Slack:

If you’re in a bind and just want to get another replica set up without losing production data, you use mysqldump to manually make an online logical backup. I think it’s something like mysqldump --all-databases --master-data --single-transaction
Vitess won’t know anything about the logical backup, but you could manually load it on a replica to get yourself back to a world where you have replicas

@dweitzman
Copy link
Member

It might be handy if vitess could manage backups in multiple different formats and let you choose how to collect the backups with commands like vtctl Backup -dbtype master -method mysqldump vs vtctl Backup -dbtype rdonly -method drain_copy vs vtctl Backup -dbtype rdonly -method xtrabackup

If we assume that people probably have mysqldump installed (feels like a safe assumption?...) then this could offer an out-of-the-box escape hatch for loss of replicas.

@makmanalp
Copy link

With #4699 merged this should be closed now

@deepthi
Copy link
Member

deepthi commented Jun 4, 2019

Fixed by #4699.
We decided not to allow specifying the backup method via vtctl, it will be continue to be specified at vttablet startup. No support has been added for mysqldump either.

@deepthi deepthi closed this as completed Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants