Solved

AIX 5.3 Full System recovery

Posted on 2009-05-11
13
1,183 Views
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.
0
Comment
Question by:harscogis
  • 6
  • 6
13 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Hi,
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
Cheers
wmp
 
0
 
LVL 61

Expert Comment

by:gheist
Comment Utility
savevg saves jfs filesystems from vg
You have to do database backups if they use raw partitions
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
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.
wmp
 
0
 

Author Comment

by:harscogis
Comment Utility
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?
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
Hi again,

> Then I run restvg once my rootvg restore is complete, correct?
Corrrect.
>  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.

wmp



0
 

Author Comment

by:harscogis
Comment Utility
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?


0
Scale it in WD Gold

With up to ten times the workload capacity of desktop drives, WD Gold hard drives employ advanced technology to deliver among the best in reliability, capacity, power efficiency and performance.

 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
OK,

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.

wmp


0
 

Author Comment

by:harscogis
Comment Utility
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.
0
 

Author Comment

by:harscogis
Comment Utility
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?
0
 

Author Comment

by:harscogis
Comment Utility
Grrrr...typing too fast.  I meant Logical volumes and filesystems in the above post.  Sorry.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 250 total points
Comment Utility
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!
wmp
 
0
 

Author Closing Comment

by:harscogis
Comment Utility
Outstanding information for me, an AIX newbie.  I very much appreciate the help.
0
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
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!
Cheers
wmp
 
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

One of the frustrating downsides to using third party RAID hardware is the frequent lack of native driver support in the standard OS.  During install, Windows prompts for third party storage drivers from CD or USB so it is straightforward, but it ca…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
In this Micro Tutorial viewers will learn how to use Windows Server Backup to create full image of their system. Tutorial shows how to install Windows Server Backup Feature on Windows 2012R2 and how to configure scheduled Bare Metal Recovery backup.…
To efficiently enable the rotation of USB drives for backups, storage pools need to be created. This way no matter which USB drive is installed, the backups will successfully write without any administrative intervention. Multiple USB devices need t…

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now