Backup, Copy, Cloning mounted disk partition on Solaris

This is how to manual backup, copy or cloning mounted disk partition on Solaris:

source: c0t0d0s0
destination:c0t1d0s0 (will be mounted on /mnt/root-backup)

*copy the disk partition layout
# prtvtoc /dev/rdsk/c0t0d0s2 | fmthard -s – /dev/rdsk/c0t1d0s2

* create UFS file systems on disk c0t1d0s0
# newfs /dev/rdsk/c0t1d0s0

*mount disk:
# mount /dev/dsk/c0t1d0s0 /mnt/root-backup/

*initiate backup and restore in single line command:
# cd /mnt/root-backup ; ufsdump 0uf – /dev/dsk/c0t0d0s0 | ufsrestore rf –

*do similar step for another slice (newfs, mount and initiate backup/restore)

*install the bootblock for c0t1d0s0:
installboot /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t1d0s0

Advertisement

How to Change and Configure Solaris 11 IP Address

Before changing the Solaris 11 IP address, please read on how the network is configured in Oracle Solaris 11

Oracle Solaris 11 uses profile-based network configuration, which is comprised of two network configuration modes: manual (fixed) and automatic (reactive). Depending on which network configuration mode you choose during an installation, either the DefaultFixed network configuration profile (NCP) or the Automatic NCP is activated on the system. If the DefaultFixed NCP is active, the network is manually configured by using the dladm and ipadm commands . If the Automatic NCP or a user-defined, automatic NCP that you previously created is active, the netcfg and netadm commands (formerly nwamcfg and nwamadm) are used to create and manage network configuration.

more detail, go to this page:

http://docs.oracle.com/cd/E23824_01/html/E24456/glhbr.html

To change the IPv4 static IP address, use below prefix:
ipadm delete-addr <interface>/v4
ipadm create-addr -T static -a <ip_address>/<subnet> <interface>/v4

[exp. changing below “net0” ip address to 192.168.10.2:
solaris_11_ip1

 

 

# ipadm delete-addr net0/v4
# ipadm create-addr -T static -a 192.168.10.2/24 net0/v4
# ipadm show-addr

*If you want to delete the interface first and then put the new ip address, run below 2 commands:

# ipadm delete-ip net0
# ipadm create-ip net0

*then

# ipadm create-addr -T static -a 192.168.10.2/24 net0/v4

[Configure an interface with DHCP:

# ipadm delete-addr net0
# ipadm create-addr -T dhcp net0/v4

Manually Configuring the Default Route for a System:
route -p add default <ip-address>