AIX 5.3 Full System recovery

Posted on 2009-05-11
Medium Priority
Last Modified: 2013-11-17
Hi - I'm a unix admin moving to an AIX environment from HP-UX.  I have some fairly general questions about Disaster Recovery on AIX.

I'm using mkdvd for the rootvg running the command:
         mksysb i m V X v /dev/cd0

So, my first question, is this best practice for mkdvd?

Next I'm curious about the user VGs.  If I do a savevg, does that backup ALL VG data for the particular VG I want to back up?

Is there anything I can do to easily have my VGs and FSs created once my rootvg is restored from the mkdvd?  Is there a generic script available that the names, sizes, etc could just be plugged into?

Lastly, as we have a large Oracle DB on our primary box, is there anything special I need to do during the restore to make sure that is functioning correctly?  I'm not an Oracle admin by any means but I have trouble believing that I can just restore all the oracle directories and it will magically work.  But maybe I'm wrong.

Thank you very much in advance.
Question by:harscogis
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
LVL 68

Expert Comment

ID: 24363254
1) you write 'mkdvd', why don't you use mkdvd? mksysb only creates images onto a tape or in a file.
The correct format using mkdvd is -
mkdvd -i -d /dev/cd0
2) Yes, savevg would do exactly that. But if you want to store the data on a DVD, you can use mkdvd to save user VGs as well.
The format -
mkdvd -d /dev/cd0 -v myvg
Note for 1), 2) - the DVD medium must have a capacity of at least 4.7 GB, and the user's (root) file ulimit should be set to unlimited.
3) There is no such script. The counterpart to savevg (or mkdvd), restvg, will create the VG, the LVs and the filesystems for you.
You could store volume group information in /tmp/vgdata/myvg for your reference and for documentation purposes using -
mkvgdata -m -X myvg
4) This is a BIG question.
As we are talking about mksysb and savevg - if you backup the user VG containing the ORACLE DB while the DB is down (cold backup), a restvg should bring the DB back to a consistent state. Take care to have all data relevant to ORACLE in this VG, and not in rootvg or a different user VG - or backup all concerned VGs (cold) at the same time (while the DB is down!), and restore all VGs at the same time.
Besides those basic utilities, there are lots of other methods to back up an ORACLE DB, including tools like Tivoli TDP, or home made scripts employing cp, dd or rsync. For such things to work correctly (especially when online backups are to be done) you need careful planning and a perfect understanding of what you're doing.
HTH a bit
LVL 62

Expert Comment

ID: 24363799
savevg saves jfs filesystems from vg
You have to do database backups if they use raw partitions
LVL 68

Expert Comment

ID: 24364001
OK, gheist is right, of course.
One of the tools to do such Oracle backups is RMAN, which I forgot to mention in my point 4). It comes free with Oracle.
An addition to my point 3) -
I wrote "restvg will create the VG ... for you"  -- yes, and if you use 'mkdvd' with the '-n' option, 'restvg' will create only the VG and will not restore user data when using the DVD built that way. This doesn't work for rootvg, though.
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.


Author Comment

ID: 24425462
OK, sorry for just now getting back to this.  I was out of the office for a few days.

Anyway, I appreciate the help thus far and I believe I'm understanding everything that has been said.

Some other questions however.  So, I take it I can have my savevg data on my DVD, that's fine.  Then I run restvg once my rootvg restore is complete, correct?

The "myvg" mentioned above is a generic name giving to the output of each savevg command, correct?

We are using Commvault to back up our data and doing both a nightly full Oracle back up, but then also on the weekends I'm shutting the DB down and backing up the entire system via a filesystem backup.  For DR purposes, I believe that the filesystem backup will be a better choice and then in a real disaster we would roll forward using the Archive Logs.  Anyway, I don't want to get too off-track, but just so I understand.  As long as my backup I'm recovering from is done with the DB is down, I should be able to restore it and Oracle will start without issue.  No?
LVL 68

Expert Comment

ID: 24425730
Hi again,

Then I run restvg once my rootvg restore is complete, correct?
The "myvg" mentioned above is a generic name giving to the output of each savevg command, correct?
myvg is just a placeholder I use as an example, since I don't know the names of your VGs (except rootvg, sure)
We are using Commvault ...
So I guess you're taking the savevg just to conserve the VG/LV/FS definitions? CommVault should bring back all your user data, so there is no need to do a full savevg. Consider using the '-n' option of mkdvd as I wrote in #24425462 above, to save time and maybe media.
I'm shutting the DB down and backing up the entire system via a filesystem backup ...
Don't you trust in your Oracle DB backups? What tool do you use to take them? CommVault, too?
Anyway, if you have the latest archive logs available (and the current redolog group to get really up-to-date), it should be possible to recover your DB using the weekly cold filesystem backup.



Author Comment

ID: 24435036
Yes, we use Commvault for Oracle as well, but those are all hot backups.  Do I trust them, yes.  Does my Oracle DBA trust them?  Well, that's another story.  Call it paranoia.  I'm only allowed to shut the DB down once per week and that one time I like to get a full snapshot of the system.

My thought was that for JUST A DR TEST, restoring that cold filesystem backup would be perfect because the Logs would be in sync with the DB.  Agreed?  Obviously for a "real" disaster we'd roll forward as you mentioned above.

So, long story short I want to run:
savevg -m /tmp/myvgs/vg1.data
savevg -m /tmp/myvgs/vg2.data
mkdvd -i -d /dev/cd0 -n /tmp/myvgs/*.data

Will that above command work, if not, how can i get multiple VGs on my mkdvd image?

LVL 68

Expert Comment

ID: 24436693

please explain what you want to achieve with your commands.

savevg needs '-v' and the real vgname as the argument (else an mksysb will be done)
'-m' , however, doesn't accept an argument.
You can use '-f /path/to/file', and the -r flag, to backup vginfo and administrative data.
/tmp/vgdata/vgname/vgname.data is created anyway by savevg (and then written to the file pointed to by '-f')

'mkdvd -i' is only valid for mksysb (rootvg image backup), and -n doesn't accept an argument.

Use mkdvd -n -d [device] -v [vgname] to backup vginfo and admin data of [vgname], and
use restvg -r -f [device]  to restore those data.
Then use CommVault to restore the real user data.

Moving the data of two VGs to one DVD is rather tricky, and the restore is by far not that straightforward.

I could develop such a solution, but since I never used it for myself this would take a considerable amount of time and effort.



Author Comment

ID: 24450406
yeah, I forgot to include the "real" vg name in my command.  Sorry about that.

OK, so I guess what I'm hearing is that if we have more than one VG that needs the vginfo and admin data saved, we can not save it to the DVD where the mkdvd image is being saved.  And that is acceptable.  I believe that I will simply need 2 DVDs, or possibly one for each VG being saved.  We have 4 VGs not including rootvg.  Three of those VGs are imperative to bringing the system up in a DR environment.

I think, in the end, what I was hoping to accomplish was having one shell script that anyone who is an admin on this box could simply run.  Or even add it as a cron job to create our recovery image.

In the end, this is my understanding:

To create JUST the system backup image:
   mkdvd -d /dev/cd0  (Do you recommend -U for UDF?)

To create backups of VGinfo and admin data of a particular VG:
   savevg -f /dev/cd0 firstVG
       load new DVDRAM
   savevg -f /dev/cd0 secondVG

Once the system is built from the mkdvd I can run:
   restvg -f /dev/cd0   (do this for each DVD with a VG on it?)

I'm basing this on what has been said and the man pages.  Is my understanding now a bit more correct?

Is Smitty easier for this type of thing that running from command line?  In HP-UX I rarely ever used SAM, and am used to doing everything from cmd line.

Author Comment

ID: 24450419
One other question about the savevg command.  Does it just create the VGs?  Or will it also bring back all the volume groups and filesystems as well?

Author Comment

ID: 24450532
Grrrr...typing too fast.  I meant Logical volumes and filesystems in the above post.  Sorry.
LVL 68

Accepted Solution

woolmilkporc earned 1000 total points
ID: 24451048
1) UDF for DVD-RAM is OK. It doesn't need intermediate storage on your filesystem, as opposed to ISO which creates the image on disk storage and burns it onto the medium later. The only drawback is that you can't do such tricks as to create only the ISO image (don't burn it) and transfer it to some VIO server to make it that way available to LPAR systems without a DVD drive. But I don't think you plan such things.
2) >> To create backups of VGinfo and admin data of a particular VG ...
To avoid writing user data with savevg you need the '-r' flag: savevg -r -f /dev/cd0 firstVG
With mkdvd you would have to issue: mkdvd -n -d /dev/cd0 -v firstVG
3) restvg - yes, issue a restvg against the respective DVD for every VG you want to restore.
When the medium has been created using the '-r' (savevg) or '-n' (mkdvd) flag, it will contain information about the volume group (physical disks), the logical volumes of that VG and the filesystems of those logical volumes. I have to repeat: No user data!
restvg against one of those media will restore the metadata of the VG, of the LV(s), of the FS(s). For user data you need your CommVault backup(s)!
4) All the commands we have been talking about are rather short and easy to remember, thus no need for smitty. But don't under-estimate it! It can do many elaborate things. And ... you can learn a lot by hitting <F6> to see the commands smitty would issue. Try it!

Author Closing Comment

ID: 31580297
Outstanding information for me, an AIX newbie.  I very much appreciate the help.
LVL 68

Expert Comment

ID: 24451885
It's always a big pleasure for me seeing people move to AIX, the maybe best commercial Unix on the planet.
Don't ever hesitate to come back here and ask your questions, if any, I'll stay tuned!
Thx for the points!

Featured Post

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Finally comes the third version of VMware Virtual SAN, whose name is 6.1, and comes loaded with new features many of which really are excellent and even surprising.
If you ever consider purchasing any Daossoft Software Products, DON'T expect any meaningful support - This article should convince you why!
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question