Saving, Sending, and Receiving ZFS Data

The zfs send command creates a stream representation of a snapshot that is written to standard output. By default, a full stream is generated. You can redirect the output to a file or to a different system. The zfs receive command creates a snapshot whose contents are specified in the stream that is provided on standard input. If a full stream is received, a new file system is created as well. You can also send ZFS snapshot data and receive ZFS snapshot data and file systems.

In this Oracle Solaris release, the zfs send command has been enhanced with -w compress option. This option enables a system to perform a raw data transfer. In this type of transfer, data blocks that are compressed are read as is on the source disk and written as is on the target. No decompression-recompression occurs during the operation.

. This system can still receive data transfers from a source that does not have the zfs send -w compress option, such as systems running previous Oracle Solaris releases. In this case, the default behavior applies, where the compressed data blocks are first decompressed before they are transferred to the target system. After the transfer is complete, the blocks are then recompressed on the receiving system. For more information, see Sending ZFS Data Using Raw Transfer.

In addition, this release includes the ability to resume transferring ZFS data. In particular, the transfer of large amounts of ZFS data can be interrupted due to network outages or system failure. To prevent having to resend the whole thing again, the zfs send and zfs receive commands can be run with the -C option to resume sending the ZFS data. For more information, see Using Resumable Replication.

This section covers the following topics:

Note the following backup solutions for saving ZFS data:

  • Enterprise backup products – These products provide the following features:

    • Per-file restoration

    • Backup media verification

    • Media management

  • File system snapshots and rolling back snapshots – Create a copy of a file system and revert to a previous file system version, if necessary.

    For more information about creating and rolling back to a snapshot, see Overview of ZFS Snapshots.

  • Saving snapshots – Using the zfs send and zfs receive commands, you can save incremental changes between snapshots but you cannot restore files individually. You must restore the entire file system snapshot..

  • Remote replication – Copy a file system from one system to another system. This process is different from a traditional volume management product that might mirror devices across a WAN. No special configuration or hardware is required. Using the zfs send and zfs receive commands to replicate a ZFS file system enables you to re-create a file system on a storage pool on another system, and specify different levels of configuration for the newly created pool, such as RAID-Z, but with identical file system data.

  • Archive utilities – Save ZFS data with archive utilities such as tar, cpio, and pax or third-party backup products. Currently, both tar and cpio translate NFSv4-style ACLs correctly, but pax does not.