Managing ZFS File Systems in Oracle® Solaris 11.2

Exit Print View

Updated: December 2014
 
 

Monitoring the Progress of ZFS Send Streams

The following zfs snapshot syntax provides you an estimated size of a ZFS snapshot stream in dry-run mode. You can use the size estimate to measure the progress of the send stream itself.

Use the following dry-run syntax to estimate the size of the snapshot stream but not send it.

# zfs snapshot -r tank/source@snap1
# zfs send -rnv tank/source@snap1
sending full stream to tank/source@snap1
sending full stream to tank/source/data@snap1
estimated stream size: 10.0G

You can monitor the progress of the send stream by inserting the pv command between the zfs send and the zfs receive commands. In the following example, the first command estimates the stream size. Then with the second command, the snapshot is sent while being monitored at the same time.

# zfs send tank/source@snap1 | pv | zfs recv pond/target
882MB 0:00:10 [95.4MB/s] [       <=>   ]

When the snapshot stream is completely received, the progress monitor identifies the total size received. For example:

# zfs send tank/source@snap1 | pv |zfs recv pond/target
10GB 0:01:55 [88.5MG/s] [       <=>   ]