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

Question: How does the restore handle duplicate data? #91

Open
andrewfenn opened this issue Mar 22, 2022 · 1 comment
Open

Question: How does the restore handle duplicate data? #91

andrewfenn opened this issue Mar 22, 2022 · 1 comment

Comments

@andrewfenn
Copy link

Hello,

Sorry to bother I wanted to ask about something not in the documentation. How does the restore handle duplicate entires?

I have lots of extremely large DBs that I want to backup and move but I don't have enough time of a maintenance window to ensure all data is captured before switching. My plan is to:

  1. Backup the data and restore on new system
  2. Switch everything to point to the new system
  3. Backup the old DB again and restore on the new system again to add any additional records they may have got created while steps 1 and 2 were working.

Would it be safe and viable to do? Do any duplicates on the second restore at step 3 get ignored while new entries that might have been added while in the maintenance period are still added to the new DB?

@dalgibbard
Copy link
Collaborator

dalgibbard commented Mar 22, 2022

Its been a long time since I used this, but iirc, when trying to restore an object which already exists, it throws a 409 conflict error, and doesn't apply.

I don't recall if this breaks the whole restore process or not though.

Edit: looks like it captures curl errors with retries using $attemptcount. I'm not sure if curl throws a non-zero error for 409 conflicts, but if it does, you could comment out those retry/fail sections as an option, or amend it to exclude a particular error code.

Edit2: see also: #79 (comment)

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

No branches or pull requests

2 participants