-
Notifications
You must be signed in to change notification settings - Fork 136
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
znapzendzetup disable on child #154
Comments
by now, znapzend does not support to exclude child datasets when running w/ a recursive policy. you'll have to set up all child datasets individually (non recursive) if you want to exclude some of them.... |
this can be labeled as "feature-request" so, because I see znapzend is already looping on each child datasets for zfs send/recv. It may be simple to skip one if org.znapzend:enabled=off EDIT - the snapshot itself is recursive and will be performed on the pointed child ... Will see what can be done |
@odoucet, did you get anywhere with this? I think the request would be interesting even if it only applied to overriding the DST option. I can live with local snapshots for transient datasets as long as they're not sent to a backup server. |
did not make any progress at all... I was busy with something else .. Then totally forgot about this one. |
Right now, i'm keeping 2 datasets for this. e.g.
|
This would be a killer feature. |
I am not good in perl, but I understand that the way to go is to do the regular snapshot and, right after that (if recursive), check which child ZFS have the flag, e.g., org.znapzend:enabled set to off.... nope? |
yes, the send operations are 'per fs' anyway, so I think the change should not be all the big |
@oetiker: I have written a possible patch addressing this issue, but I do not have around a setup to test it. Do you? How can I send it to you (the whole diff is 50 lines, but I am not very skilled in Perl, and I guess it can be made smaller)? If you do not have any testbed around I will create a VM and so... but yeah, Sunday morning, I guess... :-D |
the tests we have are all included with the package ... they work by using simulated version of the zpoo,zfs,ssh commands ... |
if you create a PR I will be glad to review |
As the sending of the ZFS streams is per stream, we can disable children ZFS from being snapshot/sent by setting the property "org.znapzend:enabled" to "off" on them. For the dataset being processed, in case the recursive flag is set, its children will be checked and their recently created snapshots removed.
I have discovered a bug on my commit: Seems that, when znapzend gets reloaded, it refreshes all the plans. As it finds the property org.znapzend:enable on a child ZFS, it considers that to be a dataset... but as there is only that property, it reports it and fails. I see two ways to solve this, maybe you can advise for one (or propose another)? a) On Config.pm, line 71. Instead of "die" if a dataset has properties missing, I feel more inclined to notify it as a warning, and continue with the next dataset. b) For the children ZFS, to define their backup plans. Might this pose a problem if the parent dataset has the recursive flag set, and not the children ZFS? |
Hello everyone, 0001-The-second-patch-for-znapzendzetup-disable-on-child-.patch.txt Please, look at it. I am not a perl geek. |
hi @speedytom please create a PR, then it is much simpler to look at your idea |
@speedytom Hi, one question: Doesn't your solution require to fully populate those datasets that want to be skipped? The idea, AFAIU, is to discard the descendant datasets with the minimum required actions, and I think that making full use of recursive datasets is a must. I checked in a patch few days ago that addresses that by: I think a cache should be populated with this information (the disabled descendants of a recursive dataset), so that only when checking the backup these are traversed but... yeah, still no time for it. |
@flixman how about detecting that the enabled = no property is the only one set and then NOT complaining about that fact as it is a valid state |
Thanks guys for your quick feedback. I appreciate it. I will try explain it in detail my intent. I wanted distinguish between parents, child and other datasets. Znapzend works without any problem with the first patch from my point of view. I wanted fix znapzendzetup. I would like see parent and children datasets when I run command "znapzendzetup list". My patch should suggest lets say a new feature. It was the first step to add new flag to all children datasets. Maybe the new flag "invisible=on" hasn't correct name. What about name "children"? I have to say that I am beginner with ZFS and znapzend. Your work is really great. Is it possible send you some patches from time to time? |
@oetiker Good! I fill prepare a PR for tomorrow afternoon :-) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still a wanted feature. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I've created a znapzend policy on 'mypoolname/user1' with recursive=ON.
I have several children on it :
I would like to disable (temporarily or not) znapzend on a specific child, let's say "olddata". This cannot be done :
If I try to edit the property myself it does not work :
And now "disable" shows an other message :
The text was updated successfully, but these errors were encountered: