Software >> OS >> Unix >> Solaris >> 11 >> ZFS >> How to ZFS send and receive snapshotsSending a ZFS SnapshotYou can use the zfs send command to send a copy of a snapshot stream and receive the snapshot stream in another pool on the same system or in another pool on a different system that is used to store backup data. For example, to send the snapshot stream on a different pool to the same system, use syntax similar to the following:
You can use zfs recv as an alias for the zfs receive command. If you are sending the snapshot stream to a different system, pipe the zfs send output through the ssh command. For example:
When you send a full stream, the destination file system must not exist. You can send incremental data by using the zfs send -i option. For example:
Note that the first argument (snap1) is the earlier snapshot and the second argument (snap2) is the later snapshot. In this case, the newtank/dana file system must already exist for the incremental receive to be successful. The incremental snap1 source can be specified as the last component of the snapshot name. This shortcut means you only have to specify the name after the @ sign for snap1, which is assumed to be from the same file system as snap2. For example:
This shortcut syntax is equivalent to the incremental syntax in the preceding example. The following message is displayed if you attempt to generate an incremental stream from a different file system snapshot1:
If you need to store many copies, consider compressing a ZFS snapshot stream representation with the gzip command. For example:
# zfs send pool/fs@snap | gzip > backupfile.gz References [1] https://docs.oracle.com/cd/E19253-01/819-5461/gbinw/index.html |