This article will show you how to migrate a system's service to a new boot device or an entirely different system of the same model.It include following topics:

Perform System Archive

Recovery from the Archive

Rename Hostname

Enable XDMCP

Perform System Archive

As you know,solaris 11 use zfs as default file system,so i'll use zfs subcommand to perform backup and recovery.Here,i'll recovery system to an entirely different system and rename system hostname.

1.View current zpool status.

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲

2.Archive Creation.

Using following command to create a recursive snapshot from the top level of the pool.After that,delete the default-named swap and dump device snapshots:

How To Perform Oracle Solaris 11 System Backup And Recovery_恢复_02

Deleting swap and dump device snapshots use following command:

How To Perform Oracle Solaris 11 System Backup And Recovery_恢复_03

3.Create an archive file.

You can save the archive file on local media or removable media.Here,i save it to nfs server.

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲_04

Recovery from the Archive

1.Boot machine from sol-11-1111-text-x86.iso and go to the shell environment.

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲_05

2.Check Network.

If you want to recovery from network,you must have a dhcp server exist or setup a static ip:

How To Perform Oracle Solaris 11 System Backup And Recovery_备份_06

172.16.255.59 is my nfs server's ip,use ping command to test:

How To Perform Oracle Solaris 11 System Backup And Recovery_Oracle_07

3.Format New Boot Disk.

Format new boot disk like this:

How To Perform Oracle Solaris 11 System Backup And Recovery_职场_08

Note:The cylinders must start with "1" not "0". After restored with cylinders start with "0",i restarted my virtual machine then i got an boot error.

4.zfs pool creation and restoration.

With the disk configured, the new root pool can be created on slice 0 by using the following command:

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲_09

Note:The recovery ZFS pools should be created with the same names as the archived ZFS pools.

Once the archive file is accessible, the data sets can be restored by using the following command.

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲_10

Configuration and Validation

1.Create swap and dump device.

How To Perform Oracle Solaris 11 System Backup And Recovery_Oracle_11

2.Install GRUB in boot disk partition:

How To Perform Oracle Solaris 11 System Backup And Recovery_休闲_12

It is possible that the same devices will not be in use, or they will be configured in a different manner, on the new system. Therefore, clear the device file system using the following command.

How To Perform Oracle Solaris 11 System Backup And Recovery_Oracle_13

3.Reboor machine.

Rename Hostname

If you want to rename hostname in solaris 11,you just modify following service and restart it to take effect.

How To Perform Oracle Solaris 11 System Backup And Recovery_恢复_14

Enable XDMCP

By default,solaris 11 didn't enable xdmcp,if you want to enable it,you need to edit the /etc/gdm/custom.conf file and change the“Enable" value to “true".After that,you must restart gdm service.

How To Perform Oracle Solaris 11 System Backup And Recovery_备份_15

For more information about xdmcp settings,please see gdm's man page.