-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
backend: add migration tool to migrate between any two backends #41866
Conversation
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
Co-authored-by: Stephen Levine <[email protected]>
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.
As mentioned elsewhere, definitely wants to be streaming and/or paginated, and I think we probably want some kind of check to make sure folks don't accidentally write to a backend with existing state in it (probably can just be a full range call with limit 1 that fails the command if something is returned). Otherwise, I think this looks great and will be very good to have. Nice work!
Co-authored-by: Edoardo Spadolini <[email protected]>
I like the idea the only issue is if you hit an error and need to rerun the migration after some items have already been moved then you are stuck. Perhaps we make this suggestion the default behavior with an flag to ignore this check. |
@dboslee safe default with force/override sounds reasonable to me. |
Apologies for the delay on this, had some higher priority things to work on. |
Co-authored-by: rosstimothy <[email protected]>
Co-authored-by: rosstimothy <[email protected]>
Co-authored-by: rosstimothy <[email protected]>
503 from docker.io 🙄 |
This adds a new hidden command
teleport migrate
.The command takes a config file which allows a source and destination backend to be specified. It then copies all the data from the source to the destination backend.
An example config looks like
We plan to use this on cloud to migrate between dynamodb and cockroachdb but its generic where it could be used to migrate between any backends. For example we could also use this to migrate between dynamodb tables in different regions.
Its important to note that all Teleport Auth services should be scaled down when running this command to avoid data inconsistencies.