Skip to content

Commit 458bb8c

Browse files
manfromafarbehlendorf
authored andcommitted
Clarify compressed zfs send/recv behavior
Docs for send and receive do not explain behavior when sending a compressed stream then receiving on a host that overrides compression with -o compress=value. The data from the send stream is written as it was from the send is the compressed form but the compression algorithm set on the receiver is the overridden version which causes some confusion as to what algorithm was actually used. Updated man docs to clarify behavior Reviewed-by: Brian Behlendorf <[email protected]> Reviewed By: Allan Jude <[email protected]> Signed-off-by: manfromafar <[email protected]> Closes #11690
1 parent cda6fdd commit 458bb8c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

man/man8/zfs-receive.8

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ causes the property to be inherited by all descendant datasets, as through
261261
was run on any descendant datasets that have this property set on the
262262
sending system.
263263
.Pp
264+
If the send stream was sent with
265+
.Fl c
266+
then overriding the
267+
.Sy compression
268+
property will have no affect on received data but the
269+
.Sy compression
270+
property will be set. To have the data recompressed on receive remove the
271+
.Fl c
272+
flag from the send stream.
273+
.Pp
264274
Any editable property can be set at receive time. Set-once properties bound
265275
to the received data, such as
266276
.Sy normalization

man/man8/zfs-send.8

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,12 @@ feature is enabled on the sending system but the
189189
option is not supplied in conjunction with
190190
.Fl c ,
191191
then the data will be decompressed before sending so it can be split into
192-
smaller block sizes.
192+
smaller block sizes. Streams sent with
193+
.Fl c
194+
will not have their data recompressed on the receiver side using
195+
.Fl o compress=value.
196+
The data will stay compressed as it was from the sender. The new compression
197+
property will be set for future data.
193198
.It Fl w, -raw
194199
For encrypted datasets, send data exactly as it exists on disk. This allows
195200
backups to be taken even if encryption keys are not currently loaded. The

0 commit comments

Comments
 (0)