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

Use TARGETS_REGULAR if the recursive flag is not set #124

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jigpu
Copy link

@jigpu jigpu commented Dec 9, 2021

The program currently stores all targets into TARGETS_RECURSIVE even
if the --recursive flag is not set. This causes the program to
incorrectly snapshot only the most-ancestral datasets in the list. For
example, the following invocation would only snapshot datasets a and
b:

$ zfs-snapshot-auto a a\child1 a\child2 b b\child1 b\child2

Instead, we should be storing each valid dataset in TARGETS_REGULAR
so that they can be backed up individually. This commit tests wether
the flag is set before deciding whih variable to update.

Fixes: #83

The program currently stores all targets into `TARGETS_RECURSIVE` even
if the `--recursive` flag is not set. This causes the program to
incorrectly snapshot only the most-ancestral datasets in the list. For
example, the following invocation would only snapshot datasets `a` and
`b`:

    $ zfs-snapshot-auto a a\child1 a\child2 b b\child1 b\child2

Instead, we should be storing each valid dataset in `TARGETS_REGULAR`
so that they can be backed up individually. This commit tests wether
the flag is set before deciding whih variable to update.

Fixes: zfsonlinux#83
@zpin
Copy link

zpin commented Nov 22, 2024

Thanks for submitting this patch. Would really appreciate getting this merged after all this time.

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

Successfully merging this pull request may close these issues.

Snapshots always recursive?
2 participants