Difference between revisions of "Documentation/ZfsSend"

Jump to navigation Jump to search
no edit summary
Line 2: Line 2:


ZFS send streams consist of records which describe writes or frees the receiving end should perform in order to recreate the sent snapshot. For example, a WRITE record could indicate that the contents of the 5th block of the file with object number 1534 should be updated. A very simple send stream is depicted below. When generating this stream the records are written to a file descriptor. When using the zfs send command this file descriptor is stdout.
ZFS send streams consist of records which describe writes or frees the receiving end should perform in order to recreate the sent snapshot. For example, a WRITE record could indicate that the contents of the 5th block of the file with object number 1534 should be updated. A very simple send stream is depicted below. When generating this stream the records are written to a file descriptor. When using the zfs send command this file descriptor is stdout.
[[File:SendStreamFormat.png|center|700px]]
[[File:SendStreamFormat.png|center|700px]]
The zstreamdump command can be used to print send stream contents in a human-readable format. As an example, we can create a ZFS filesystem, place an empty file in it, snapshot it, modify that file, then snapshot it again, and send the changes between the first and second snapshot to a file:
$ zfs create rpool/send-test
$ touch /rpool/send-test/tmp
$ zfs snapshot rpool/send-test@before
$ echo 123 > /rpool/send-test/tmp
$ zfs snapshot rpool/send-test@after
$ zfs send -i rpool/send-test@before rpool/send-test@after > send.log
Editor
90

edits

Navigation menu