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 #1

Merged
merged 1 commit into from
Jun 7, 2022

Conversation

daniel-ayers
Copy link
Owner

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

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
@daniel-ayers daniel-ayers merged commit b2837ba into daniel-ayers:master Jun 7, 2022
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