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 would you go about migrating data fully before letting the main process start? #314

Open
omerxx opened this issue Jul 31, 2024 · 1 comment

Comments

@omerxx
Copy link

omerxx commented Jul 31, 2024

Hi,
I'd like to migrate PVCs from one database to another. However, I don't want the DB process to start because it'll start joining my cluster or serving users. Beyond, I'd like to use it with other applications and only let them start when the data is fully migrated.
Is there a feature of the tool that allows this? Should I use something like an init container?
What do you guys normally do?

@utkuozdemir
Copy link
Owner

This tool is completely agnostic to such cases, it simply copies the data over. If the source or destination PVC is already mounted to a pod, it fails explicitly, unless --ignore-mounted flag is set.

So what you would want to do is, scale the database workload (deployment/statefulset) to zero, do the migration and then scale it back up.

Also, to clarify, this tool's main use case is for one-off migrations, not sync'ing data continuously or so. So an init container etc. do not make much sense imo. But ofc, it always depends on what you need exactly.

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