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.
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:
Deleting swap and dump device snapshots use following command:
3.Create an archive file.
You can save the archive file on local media or removable media.Here,i save it to nfs server.
Recovery from the Archive
1.Boot machine from sol-11-1111-text-x86.iso and go to the shell environment.
2.Check Network.
If you want to recovery from network,you must have a dhcp server exist or setup a static ip:
172.16.255.59 is my nfs server's ip,use ping command to test:
3.Format New Boot Disk.
Format new boot disk like this:
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:
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.
Configuration and Validation
1.Create swap and dump device.
2.Install GRUB in boot disk partition:
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.
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.
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.
For more information about xdmcp settings,please see gdm's man page.