Solaris

Solaris ships with tools for backup and restore of the operating environment. With Solaris 10 it was "Flasharchive", in Solaris 11 we have "Unified Archive". Follow the simple steps below to ensure the operating environment is backed up, and then verify some of the restore options.

Solaris 11 - System Backup

  1. Identify an NFS share to dump the backup onto
  2. Identify any data exclusions on the server (eg database volumes)
  3. Clear up any alternate boot environment issues, deleted the older BE's
  4. Determine zones and datasets we might include/exclude ($ zpool list ; $ zoneadm list)
  5. Generate the archive, here are some examples,
# Clone archive, all non-global zones, to NFS mount "/ua",
$ Z=`zoneadm list | grep -v global | awk '{print "-z "$1}' | xargs`
$ archiveadm create $Z /ua/`hostname`.ng.uar


# Recovery archive, global zone only, and some FS exclusions,
$ D=`zpool list -H | awk '{print $1}' | grep -v rpool | awk '{print "-D "$1}' | xargs`
$ archiveadm create -r -z global $D /ua/`hostname`.gl.uar


# Recovery archive, non-global zones,
for Z in `zoneadm list | grep -v global | xargs`; do
  archiveadm create -r -z $Z /ua/$Z.uar
  done

Review the backup archive content, and note that the recovery archive type includes system configuration (hostname, IP etc).

$ archiveadm info -v /ua/zone1.uar


Solaris 11 - Restore a zone


In this example we destroy an existing zone and replace it using the archive backup.

$ zoneadm -z zone1 halt
$ zoneadm -z zone1 uninstall -F
$ zonecfg -z zone1 delete -F
$ zonecfg -z zone1 create -a /ua/my.rcv.uar -z zone1
$ zoneadm -z zone1 install -a /ua/my.rcv.uar -z zone1
$ zoneadm -z zone1 boot


Optionally, preserve the original zone and create the new zone with a different name.

Solaris 11 Migration Restore

more soon...




No comments:

Post a Comment