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

ensure pod volume is empty before restic restore #1764

Closed
prydonius opened this issue Aug 14, 2019 · 3 comments
Closed

ensure pod volume is empty before restic restore #1764

prydonius opened this issue Aug 14, 2019 · 3 comments
Labels
Restic Relates to the restic integration

Comments

@prydonius
Copy link
Contributor

prydonius commented Aug 14, 2019

See conversation on Slack: https://kubernetes.slack.com/archives/C6VCGP4MT/p1565817791421900

Restic will overwrite any files from a backup that already exist in a volume on restore. Whilst this is expected for Restic, it might not make sense in Velero's usecase. To be consistent with cloud-provider snapshot restores, we should check to ensure that a pod volume is empty before attempting to restore into it. This way, we never accidentally overwrite any existing files in a volume and can expect the restored volume to only contain files that were in the backup. Does this sound like an okay expectation?

Additionally if we know the directory is empty, we can calculate the progress of a restore based on the size of the directory and size of the full backup (#1749).

@skriss
Copy link
Contributor

skriss commented Sep 5, 2019

I think we decided that this isn't an issue, as PVs will be dynamically provisioned (empty) on a restic restore, and things like emptyDir will also be recreated as the pod is restored - is there anything else to follow up on here?

@prydonius
Copy link
Contributor Author

I haven't tried it, but what happens if you try to use a gitRepo volume, or some other type of volume that might pull in additional files before the init-containers? Just a thought, I know the gitRepo volume isn't really used and I don't know of any other volume types that do this. I'm happy closing this out if we don't think it's worth investigating this more.

@skriss skriss added the Restic Relates to the restic integration label Sep 16, 2019
@skriss
Copy link
Contributor

skriss commented Feb 13, 2020

closing this one out as I don't think there's an action item here, but we can reopen as needed.

👋 adnan :)

@skriss skriss closed this as completed Feb 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Restic Relates to the restic integration
Projects
None yet
Development

No branches or pull requests

2 participants