ADSM-L

Re: Restore-Script(AIX)

2000-01-26 21:45:12
Subject: Re: Restore-Script(AIX)
From: Joel Fuhrman <joelf AT CAC.WASHINGTON DOT EDU>
Date: Wed, 26 Jan 2000 18:45:12 -0800
Here is a script to save the volume information for the non-rootvg.  It was
on the list sometime in the past.  I don't know the original author.

#!/usr/bin/ksh

# The shell will save the volume group descriptions for the
# non-rootvg volume groups using the savevg command.  This
# output can be used by the restore vg command to recreate
# the volume groups.  For example:
#       restvg -qf /vg_images/savevg.$VGNAME

rm -f /vg_images/savevg.*
rm -f /tmp/savevg
integer total_error=0

# 1) get the non-rootvg volume groups (vg)
# 2) get the logical volumes (lv) by vg's, remove the header
#    line, remove the unmounted & raw lv's, remove the nfs
#    mounted files and print the mount point.
# 3) save the mount point in /etc/exclude.$VGNAME
# 4) save the volume group information for each volume group,
#    while excluding the actual files, in /vg_images/savevg.$VGNAME

lsvg -o |grep -v rootvg |while read VGNAME
        do
        lsvg -l $VGNAME |grep -v LV | grep -v "N/A" | grep / | awk '{print $7 
"/"} ' \
                > /etc/exclude.$VGNAME
        savevg -eif/vg_images/savevg.$VGNAME $VGNAME >> /tmp/savevg 2>&1
        (( total_error = total_error + $? ))
done

if (( total_error > 0 ))
then
        /bin/mail -s "`hostname`: savevg had errors" admin < /tmp/savevg
        exit 1
fi
exit 0


On Wed, 26 Jan 2000, Bert Moonen wrote:

> Restore-Script(AIX),
>
> Does someone have a script to restore a complete AIX-System including
> volumegroups,
> logical volumes and filesystems and the last active backup versions.
> I First restore a mksysb(8mm) on the AIX-System(or is there an other way).
>
> ADSMSERVER 3.1.2.0
> AIX-VERSION    4.3.2
> AIX-Systems 4.2.x and 4.3.x
>
>
> Greetings,
>
> Bert Moonen
> E-mail; bert.moonen AT abp DOT nl
>
<Prev in Thread] Current Thread [Next in Thread>