ADSM-L

Re: How do you store info for DR?

1997-12-04 11:30:38
Subject: Re: How do you store info for DR?
From: Hilton Tina <HiltonT AT EXCH1.INDY.TCE DOT COM>
Date: Thu, 4 Dec 1997 11:30:38 -0500
We have a script that we run once a week on all our RS6000SP nodes to
save the volume group structure without saving the files.  The savevg
image is backed up by ADSM in the next incremental backup.  The files
get backed up through the normal incremental backups too.  The script
finds all the volume groups and creates the exclude files so you don't
need to manually keep that up to date.  Here it is:

rm -f /node_images/savevg.isp*
integer total_error=0
HOSTNAME=`hostname`
#
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 -emf/node_images/savevg.$HOSTNAME.$VGNAME  $VGNAME
 (( total_error =  total_error + $? ))
done
if (( total_error > 0 ))
then
  print "One or more savevg's failed.  Total rc = $total_error"
  exit 8
else
  print "All savevg's for node $HOSTNAME completed successfully"
  exit 0
fi

Tina Hilton
Thomson Consumer Electronics

> ----------
> From:         Owen Crow[SMTP:crow AT SUGAR-LAND.MIS.SLB DOT COM]
> Reply To:     ADSM: Dist Stor Manager
> Sent:         Thursday, December 04, 1997 10:21 AM
> To:   ADSM-L AT VM.MARIST DOT EDU
> Subject:      Fw: How do you store info for DR?
>
> To all,
>
> A few weeks ago, I asked the list how you save VG/LV/FS info and
> restore for disaster recovery.  I received many good replies and my
> belated thanks to those who took the time.
>
> The answer which appealed to my innate laziness was Tom Kauffman's
> suggestion to use the savevg/restvg commands while excluding all the
> files in the VG.  An example is worth more than any explanation.
> Given that you have rootvg and vg00, do the following:
>
> Create the file /etc/exclude.vg00 with the following single line:
> /
>
> Then use the savevg command:
> savevg -ief /vg00.save
>
> The exclude line is compared grep-fashion to a find of all files in
> the VG.  It matches all files, so they are excluded giving you a
> zero-file backup -- except the image maps (with all VG and FS info)
> are saved in /vg00.save.  Do a mksysb or just use a regular ADSM
> backup.
>
> After your disaster, restore your mksysb, restore vg00.save in / and
> run:
> restvg -qf /vg00.save
>
> Presto, your VG is recreated on the same disks with all the old LVs
> and FSs (and PSs, too I guess, though I should test that one).  Then
> just restore from ADSM.
>
> It's a very clean, automated solution with only the little exclude
> file kludge.  Be aware that AIX 4.1.3, 4.1.4 and perhaps others have a
> bug in the mksysb/savevg commands which barf when excluding some
> files.  Upgrade to 4.1.5 or later to fix it.
>
> Good luck,
> Owen
>
> -----Original Message-----
> From: Kauffman, Tom <KauffmanT AT nibco DOT com>
> To: 'crow AT sugar-land.mis.slb DOT com' <crow AT sugar-land.mis.slb DOT com>
> Date: Wednesday, November 19, 1997 4:11 PM
> Subject: RE: How do you store info for DR?
>
>
> >Owen -
> >
> >Take a look at savevg/restvg (/usr/bin/savevg and /usr/bin/restvg).
> You
> >can run savevg with an exclude list of all filesystems/mountpoints in
> >your volume group - which will create an empty file suitable for use
> by
> >restvg. The significance is that restvg will recreate the volume
> group,
> >logical volumes, and file systems for you.
> >
> >I do this before running a mksysb, with the output into / (root)
> (it's
> >an empty file). For D/R, you boot/restore the mksysb and then run
> restvg
> >with the file in root as input. Then you varyonvg the volume group (I
> >think this is done for you in aix 4.2.1) and run your adsm restore.
> >
> >I was hacking restvg to not use tape for input when an IBM type
> showed
> >me the exclude process on savevg . . .
> >
> >All the magic is in /usr/bin/mkvgdata and /usr/bin/restvg, if you
> really
> >feel strongly about writing your own <grin>
> >
> >I want to thank you for the pearl scripts you posted some time back -
> >we're starting to use them heavily for tape management now.
> >
> >Tom Kauffman
> >Sr. Technical Advisor
> >NIBCO Inc.
> >
> >>----------
> >>From: Owen Crow[SMTP:crow AT SUGAR-LAND.MIS.SLB DOT COM]
> >>Sent: Wednesday, November 19, 1997 2:02 PM
> >>To: ADSM-L AT VM.MARIST DOT EDU
> >>Subject: How do you store info for DR?
> >>
> >>I'm writing a script to store information about the filesystem
> >>environment in a standard file so a system can be recreated from
> >>scratch after a disaster.  Has anyone worked on this before and are
> >>you willing to share?
> >>
> >>I plan on storing the info from lsvg, lsfs, lscfg, etc. in
> >>/.system_info and then using another script to use the info from
> this
> >>file on a new system to recreate the environment prior to ADSM
> >>restore.
> >>
> >>No, I don't have the DR option of ADSM (which probably includes this
> >>very thing) and am not likely to get approval for it.
> >>
> >>Thanks,
> >>Owen
> >>
>