Page MenuHomeFreeBSD

Add --force (ignore missing snapshots option) to "zfs send -R"
Needs ReviewPublic

Authored by skozlov on Feb 13 2019, 4:32 PM.

Details

Reviewers
allanjude
Group Reviewers
manpages
ZFS
Summary

Sometimes it's required to backup all ZFS datasets except some subtree. To accomplish this, one can make an atomic snapshot of
multiple datasets by supplying multiple snapshots names to one "zfs snapshot" command. But having done that - it's impossible
to send the snapshots recursively starting from the pool level because "zfs send -R" command returns error if it finds that
the part of the snapshot tree is missing.

This commit adds possibility to supply -f/--force flag to "zfs send -R" to ignore missing snapshot subtree and still send
whatever can be sent.

Please MFC to 12-STABLE to land in 12.1-RELEASE if no compatibility issues exist.

Authors: Piotr Pietruszewski (Intel), Sergey Kozlov (Intel)
Sponsored by: Intel Corporation

Test Plan

Tested by creating custom zfs/libzfs on 12.0-R machine and taking a full backup using "zfs send -RLecvf" with part of the
snapshot tree missing.

Diff Detail

Repository
rS FreeBSD src repository
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22481
Build 21635: arc lint + arc unit