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

CopyVolumeData enhancement to use Kopia #2921

Open
mlavi opened this issue Jun 4, 2024 · 4 comments
Open

CopyVolumeData enhancement to use Kopia #2921

mlavi opened this issue Jun 4, 2024 · 4 comments
Assignees

Comments

@mlavi
Copy link
Contributor

mlavi commented Jun 4, 2024

In discussion with @michaelcourcy today, he noted that the Kanister CopyVolumeData function exists, but it appears to be Restic specific.

Can we use this function with Kopia and without a Kanister sidecar? Operators cannot implement the sidecar pattern.

@hairyhum
Copy link
Contributor

hairyhum commented Jun 6, 2024

What we can do about it is to deprecate the restic-specific functions and create new kopia-specific functions for backup compatibility.

@hairyhum hairyhum self-assigned this Jun 6, 2024
@hairyhum
Copy link
Contributor

hairyhum commented Jun 6, 2024

Draft implementation using kopia repository server can be found here: #2143

@michaelcourcy
Copy link
Contributor

michaelcourcy commented Jun 20, 2024

Can we imagine a workflow that include snapshot + export, because the replacement you propose still require a sidecar correct ? We can imagine doing that in 5 steps

  1. Take a snap
  2. Create a PVC clone from the snap
  3. Export the cloned (which is not an issue because the clone is an orphaned pvc)
  4. Output the kopia identifier
  5. Removed the cloned pvc

But that would make sense to create a function for doing the 5 altogether, it would take 3 arguments

arg role example
pvcName The pvc we want to export my-pvc
snapshotClass The snapshot class to use to take the snapshot ebs-snapclass
kopiaRepoPassword The kopia repository password myUn6ue$$ablepwd

And would output the kopia identifier

That would bring a lot to the blueprint author

  • Waiting for the snapshot to be ready
  • Waiting for the clone to be ready
  • All the export : attach a datamover, handle password error, output progression in the logs, output meaningful error message, output kopia identifier
  • Make sure the cloned PVC is properly removed

@hairyhum
Copy link
Contributor

because the replacement you propose still require a sidecar correct

CopyVolumeData and CopyVolumeDataUsingKopiaServer create a new pod with PVC mounted to it, so that's not a sidecar. Or do you mean something else?

But that would make sense to create a function for doing the 5 altogether

That's an interesting question, a function which should do multiple stages sounds a lot like a blueprint. Composability of blueprints is a challenge of course.

What it looks to me is following steps:

  1. CreateCSISnapshot (this one waits for completion)
  2. RestoreCSISnapshot into temp PVC
  3. CopyVolumeDataUsingKopiaServer (this one will save the PVC into kopia using temporary pod and return an identifier)
  4. DeleteCSISnapshot
  5. KubeOps delete temp PVC

@github-project-automation github-project-automation bot moved this to To Be Triaged in Kanister Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To Be Triaged
Development

No branches or pull requests

4 participants