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

Is it possible to backup/restore using restic without remote bucket #2027

Closed
Ilyes512 opened this issue Oct 31, 2019 · 4 comments
Closed

Is it possible to backup/restore using restic without remote bucket #2027

Ilyes512 opened this issue Oct 31, 2019 · 4 comments

Comments

@Ilyes512
Copy link

Is it possible to backup a kind cluster using restic and store the "snapshot"/result locally on your own machine. I just want to create snapshot of my dev cluster so I can restore it after, for instance, a reboot of my laptop.

@skriss
Copy link
Contributor

skriss commented Nov 1, 2019

@Ilyes512 it is possible. There is a limitation, though, in that velero's restic integration can't back up hostPath volumes/PVs - so if you're using kind's hostPath provisioner for PVs, you won't be able to back those up. You could use emptyDir volumes as an alternative, if possible.

Here's one way to do it using minIO (I just tried this out and it worked, barring the hostPath limitation):

  • run a minIO instance locally on your laptop - this will be your S3-compatible object storage provider (see https://docs.min.io/docs/minio-quickstart-guide.html if you need more detail)
  • roughly follow the steps here to install velero using minio, with a few modifications:
    • in step 1, use the credentials that minio gave you when you started running it on your laptop
    • you don't need to run the first command in step 2 (00-minio-deployment.yaml), since you already have minio running on your laptop
    • your velero install command should look like the following:
velero install \
    --provider aws \
    --bucket <YOUR-MINIO-BUCKET> \
    --secret-file ./credentials-velero \
    --backup-location-config region=minio,s3ForcePathStyle="true",s3Url=http://<YOUR-LAPTOP-HOSTNAME>.local:9000 \
    --use-volume-snapshots=false \
    --use-restic

@skriss
Copy link
Contributor

skriss commented Nov 1, 2019

Let us know if this works for you!

@Ilyes512
Copy link
Author

Ilyes512 commented Nov 1, 2019

Yeah... should have maybe waited or updated my question... but I am now playing with minio and reading the docs. Although I think it's a bit much and It should be easier (with less deps) to do.

But I will try it anyways so your instructions will come in handy :)

@skriss
Copy link
Contributor

skriss commented Nov 5, 2019

@Ilyes512 we have #1229 to support non-object-store backends and #1178 to support additional restic backends. Perhaps those would cover some of what you're looking to do - feel free to add comments on either/both! I'm going to close this out for now, but feel free to reach out again as needed.

@skriss skriss closed this as completed Nov 5, 2019
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