-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow "sparse" option for Kopia & Restic restore #6664
Comments
This issue also applies to Kopia path. |
Given we have made the decision to move away from Restic, I don't think we want to continue making enhancement for Restic. |
I was thinking the same way too but we have a user who cannot move from Restic at this point. So unless it imposes a huge burden, we should make an attempt to support Restic as well. |
BTW, Can you please assign this issue to @dzaninovic? I will be away for few days and he will work on this in the mean while. |
@draghuram So there are different issues with restic:
For 1, as long as it's considered supported, at a minimum, it needs bugfixes. As for new features, in the past we've taken the approach that we won't add them, mostly due to resource constraints/priorities. If a community member provides PRs to implement features we hadn't intended to include in restic, we'd probably need to have a discussion around it. As for 2, I believe the intent is to deprecate restic in the near future, meaning that at some point afterwards it is expected to disappear entirely (still need to get that deprecation policy PR approved/merged, though). |
I tried, but couldn't assign the issue to David directly. Maybe he needs to join the discussion of this issue first, i.e., make some comments or submit a PR for this issue. |
I will look into what code changes would be needed to support this. |
Possibly related to #4129 in terms of needing a higher-level configuration framework for passing options to FSB |
IMO we don't wanna add such param in restore CR. |
I wonder if configuration being discussed in #6697 would help for this option as well. |
IMO if this is a high priority, instead of adding restic config policy, and later kopia config policy, we should first introduce a higher level "policy" as a container of different policies and define how to reference such policy in the restore CR, how to expose it via CLI, etc, and then we can add these config policies into this policy. |
I agree that a "container" policy would be useful. How about something like this? I am repurposing the idea proposed in #6697 but with some changes: The following will go in "resource policies" configmap.
As can be seen, "sparse" option is "global" option and should be processed by any uploader that supports it (both current uploaders - restic and kopia do). |
I agree with the concept of unified API for all uploaders. We expect a loose struct of the policy, so the current Please just wait some time, the design is on the way, I think the initial version of the ALL-IN-ONE policy will be available soon. |
Thanks @Lyndon-Li. I look forward to seeing the details of ALL-IN-ONE policy. |
In today's community call, Daniel mentioned that ALL-IN-ONE policy is being dropped and most probably, new field will be added to restore CR to control "sparse" behavior. Daniel/Lyndon, please post your thoughts in this matter so that I can propose new design. |
@draghuram it's highly welcome you to submit a design. It would be not suitable to put all kinds of configurations or policies ALL-IN-ONE. The "sparse" option is more restore-related, it could change it in every restore. We may not need to complicate this. We can directly pass the restore-related action through the create restore option and store it in the spec of the restore CR. Additionally, we can’t ALL-IN-ONE put all configurations in secrets, configmaps, or CRDs because ETCD has a size limit (1.5MiB) for each request. |
Thanks @qiuming-best. I am ok to add this as an option in restore CR. How ever, there are few choices in how we can add there and we need to pick one:
I am personally ok with either though I have slight preference for (2). CC @sseago. |
@draghuram is sparse restore datamover-only, or is it also relevant for FS backup? If the latter, then we probably wouldn't want it in a datamover-specific map. |
The option should be for VGDP (Velero Generic Data Path) which is shared by fs-backup and data mover, so probably we call it "dataPathOptions", or a more user friendly name with the analogous meaning. |
As @Lyndon-Li says, it should apply to both file system backup and data mover but I intended "dataMoverOptions" to mean any backup that involves data transfer, as opposed to snapshots. But I can see the confusion here. I am not very particular about the "map" name as long it is reasonably clear. BTW, does this mean, we are agreeing to not add the boolean directly at the top level? |
|
There is indeed a contradiction here for the option name:
If we want to use Let's discuss this further. |
It will nice if some decision can be arrived at. This is one of those cases where code changes are small but user interface is hard. One alternative is to simply have a top level option "sparseRestore" or "sparse" and document that it applies only in some cases. |
@draghuram Personally, I suggest we find a user friendly name for VGDP, this is helpful not only for the current requirement but for more future requirements that need to configure VGDP. |
@draghuram @reasonerjt @qiuming-best @sseago @shubham-pampattiwar
|
For now, if we don't want to create the global uploaderConfig CM, we can also put the uploaderConfig into Backup/Restore CRDs, but the backup CRD and restore CRD can share the same uploaderConfig structure. In future, if we want to move it outside, we can do it with very small efforts. |
@mrnold FYI |
I am fine with adding "uploaderConfig" field in restore CR and inside that field, we can add a boolean flag "sparseRestore". I am fine with adding in Backup CR as well but for the purpose of this issue, only restore matters. If there is consensus on this design, we can work on implementing it. |
FYI of the Uploader Config design PR #7005 |
@draghuram Perhaps you can refer to this issue for designing and implementing the code. |
I will soon create design for the issue though there is no guarantee that implementation can be finished before RC date. |
@draghuram I've implemented theSparse option for Kopia & Restic, I would appreciate it if you could help me verify it |
Thanks @qiuming-best. We will give it a try. |
Hi @qiuming-best, The restore test using a data mover and Kopia works as expected in my test at CloudCasa. |
Describe the problem/challenge you have
Restic, by default, restores sparse files as non-sparse, thus increasing the disk space used on the target PV compared to the source PV. In some cases, this leads to "No space left on the device" errors which are confusing to users because the source PV has no issues hosting the file. For an example, see #2298.
Describe the solution you'd like
Restic 0.15 supports
--sparse
option which results in a sparse file being restored as sparse file. Velero 1.11 does ship with Restic 0.15 but there is currently no way of passing this option to the command constructed by Velero. The solution is to come up a mechanism where users can pass additional arguments to the restic command. Or provide a "options" field in restore CR that accepts Restic (and Kopia) specific options. Perhaps, the scheme can be generalized so that both backup and restore can accept additional options.Environment:
velero version
): 1.11.0Vote on this issue!
This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.
The text was updated successfully, but these errors were encountered: