Go to main content

Creating and Using Oracle® Solaris Zones

Exit Print View

Updated: August 2019
 
 

Backing Up and Recreating Zones

This section provides procedures to back up files in zones and the zone configuration file, and to use a saved configuration file to recreate the zone.


Note -  On a system with zones on shared storage, archive and deploy each global or non-global zone separately. See How to Archive a System That Contains Zones on Shared Storage in Using Unified Archives for System Recovery and Cloning in Oracle Solaris 11.4.
Example 26  Using Unified Archives to Back Up a System With Zones

The following example creates a recovery archive of the zone my-zone to /net/server/my-zone-archive.uar.

host1$ pfbash archiveadm create -r -z my-zone /net/server/my-zone-archive.uar
Example 27  Printing a Copy of a Zone Configuration

The administrator creates a backup file of the non-global zone configuration at first login after responding to the sysidtool questions. The administrator plans to use the backup later to create the zone again.

global$ pfbash zonecfg -z my-zone export > /net/server/my-zone-configtemplate.txt
Example 28  Recreating a Non-Global Zone

The administrator follows these steps to recreate my-zone from the files in Example 27, Printing a Copy of a Zone Configuration and Example 26, Using Unified Archives to Back Up a System With Zones.

  1. Uses the configuration file to configure the zone.

    host2$ pfbash zonecfg -z my-zone -f /net/server/my-zone-configtemplate.txt
  2. Uses the archive to install the zone.

    host2$ zoneadm -z my-zone install -a /net/server/my-zone-archive.uar