Copying Zones to Other Systems

When you need to migrate one or more zones needs to another system, use Oracle Solaris Unified Archives, which manage all cloning and recovery operations in the operating system and which operate on global, native, as well as kernel zones. For more information about Unified Archives, see Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.4. For instructions about migrating zones, which include copying zones to other systems, see Chapter 10, Transforming Systems to Oracle Solaris Zones in Creating and Using Oracle Solaris Zones.

If all zones on one system need to move to another ZFS pool on a different system, consider using a replication stream because it preserves snapshots and clones. Snapshots and clones are used extensively by pkg update, beadm create, and the zoneadm clone commands.

In the following example, the sysA's zones are installed in the rpool/zones file system and they need to be copied to the newpool/zones file system on sysB. The following commands create a snapshot and copy the data to sysB by using a replication stream:

sysA$ zfs snapshot -r rpool/zones@send-to-sysB
sysA$ zfs send -R rpool/zones@send-to-sysB | ssh sysB zfs receive -d newpool

Note:

The commands refer only to the ZFS aspect of the operation. You would need to perform other zones-related command to complete the task. For specific information, refer to Chapter 10, Transforming Systems to Oracle Solaris Zones in Creating and Using Oracle Solaris Zones.