====== AIX migrate_aix73.sh ======
This script 'll migrate a server from AIX6.1, 7.1, 7.2 to AIX 7.3
**Requirements** NIM server and a VG nimvg with enough free space (about 30GB)
[root@nim001]/root/scripts> cat migrate_aix73.sh
#!/usr/bin/ksh
# set -x
##################################################
#@(#) AIX migrate to AIX7.3
# migration is done by NIM server using alternate
# disk migration, you have to specify a client
# NIM, and a disk free for the migration on
# this client
##################################################
# v1.1 06-2023 add verbose default
##################################################
dir=`dirname $0`
if [ -f $dir/.env ]
then
. $dir/.env
else
path_script=$dir
export sn=`basename $0 | cut -d. -f1`
export logpath=/tmp
export logname=$logpath/$sn.log
fi
aixleveltl=$(echo ${aixmain}${tl} | sed 's/\(.\)/\1\./g')
spot=aix7300-02-02_spot
lpp_source=aix7300-02-02_lpp
vg=nimvg
client=$1
disk=$2
#-------------------------
migrate_to_aix73()
{
date '+%d-%m-%Y %H:%M'
#echo "/usr/sbin/nimadm -H -c $client -l $lpp_source -s $spot -d $disk -Y" | at now
ksh /usr/sbin/nimadm -H -c $client -l $lpp_source -s $spot -d $disk -j $vg-Y &
}
#main > $logname 2>&1
migrate_to_aix73 | tee $logname 2>&1