Send a complete zfs pool

Imagine, that you have a zfs pool with dozens of zfs datasets which you need to migrate to another box. “How do I accomplish that” is a reasonable question. Actually, that’s dead easy with zfs send/receive mechanism:

# zpool list zones
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
zones  67.5G  30.5G  37.0G    45%  ONLINE  -

Firstly create a recursive snapshot and once it’s over you could send/receive the resulting data stream to another host:

# zfs snapshot -r zones@zones_snapshot
# zfs send -R zones@zones_snapshot | ssh user@host "zfs receive -Fd zones"
Posted on February 4, 2010 at 5:39 pm by sergeyt · Permalink
In: Solaris

Leave a Reply