diff --git a/README.md b/README.md index 2b2354e..443b8f1 100644 --- a/README.md +++ b/README.md @@ -150,12 +150,12 @@ zfs snapshot pool/dataset@201707301234 * Copy over a dataset that does not yet exist on the destination, or has no snapshots: ``` -zfs send sourcepool/dataset@201707301234 | ssh host zfs recv -F destpool/dataset +zfs send -p sourcepool/dataset@201707301234 | ssh host zfs recv -F destpool/dataset ``` -* Copy over a dataset that has at least one snapshot: +* Copy over a dataset that has at least one snapshot on the destination pool: ``` -zfs send -I 201707290000 sourcepool/dataset@201707301234 | \ +zfs send -p -I 201707290000 sourcepool/dataset@201707301234 | \ ssh host zfs recv -F destpool/dataset ``` @@ -164,6 +164,10 @@ existing datasets and snapshots. ## Changelog +### Unreleased + ++ Always send dataset properties (`zfs send -p`) + ### Release 1.1.0 (2017-07-30) * Improve error handling and documentation diff --git a/zfssync.py b/zfssync.py index a5566a7..08257d9 100755 --- a/zfssync.py +++ b/zfssync.py @@ -292,7 +292,7 @@ def sync(self, srcds): log(1, "sync: {} -> {}: syncing snapshots from {} to {}".format(srcds, dstds, startSnapId, endSnapId)) else: log(1, "sync: {} -> {}: syncing all snapshots up to {}".format(srcds, dstds, endSnapId)) - shellPipe(srcds.pool.host, ['zfs', 'send'] + startcmd + [endSnap], + shellPipe(srcds.pool.host, ['zfs', 'send', '-p'] + startcmd + [endSnap], dstds.pool.host, ['zfs', 'recv', '-F', dstds.dataset], nosideeffect=False) def __repr__(self):