-
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
Bug Report: DeleteBeforeRestore
is ignored in backup engines
#16811
Comments
when working on #16295, we noticed both For us it wasn't an issue since we either restore on an empty tablet or we call the |
TL;DR there is no bug. Let's look at these functions from restore.go
and
|
thanks for looking into @deepthi. My understanding and @frouioui can probably weigh in since it was him that originally reported this behaviour, was that when creating a new tablet in the vitess operator, it would bring up the pod with existing data, then start the In that particular case, it seems |
Is what I said in the comment you linked @rvrangel, which is actually wrong and was based on bad assumptions. When the data directory of the tablet is not empty, we will restart the tablet from that directory and not from backup. I created a test cluster to illustrate it:
I am going to close this issue for now. |
Overview of the Issue
Pulling this discussion out of another PR: Vitess has a flag called
DeleteBeforeRestore
that is supposed to signal the backup engines if they should wipe out the current MySQL data before restoring a backup, but it is currently being ignored by all backup engines (including the new one introduce in #16295)We decided to keep the behaviour consistent for now, but this issue is to continue the discussion if we should remove this or fix anything that might be breaking as a result of it.
Reproduction Steps
From the description in here, it seems
vtop
would be relying on the backup engines ignoring that value so that when thevttablet
starts with the--restore-from-backup
it still deletes and restores the databases despite thevtdataroot
already being filled.Binary Version
current version on (`main`)
Operating System and Environment details
Log Fragments
No response
The text was updated successfully, but these errors were encountered: