1835360 Members
3667 Online
110078 Solutions
New Discussion

how to restore vg01

 
SOLVED
Go to solution
terry123
Regular Advisor

how to restore vg01

hi All,

as i know it is possible to create vg00+vg01 backup via ignite. but is it possible to restore vg01 only?

i would like to backup both vg00 & vg01 via ignite with the following command:

make_tape_recovery -AvI -a /dev/rmt/0mn -x inc_entire=vg00 -x inc_entire=vg01

anyone can help me? thanks a lot

7 REPLIES 7
Bill Hassell
Honored Contributor

Re: how to restore vg01

Ignite is designed to do only one thing well and that is to create a restore tape for vg00. While you can backup vg01 and vg02, it very convoluted to restore specific files from the tape. They are not stored by volume group, they are stored by mountpoint (ie, full pathname). The tape contains a special bootable image with a kernel followed by a pax or cpio backup of vg01 (and in your case, vg02). To restore just vg01 will require multiple restores, each one with the mountpoint in vg01. If there are 10 mountpoints in vg01, then 10 separate restores will be needed.

The options used above should be changed to:

make_tape_recovery -I -v -x inc_entire=vg00 -a /dev/rmt/0mn

After running make_tape_recovery, run fbackup to backup all your files on all volume groups. fbackup supports multiple tapes if needed and has a high speed restore that allows for many pathnames to be entered on the command line (like 10 mountpoints for vg01).


Bill Hassell, sysadmin
terry123
Regular Advisor

Re: how to restore vg01

thx Bill,

that means i need to make a vg00 backup for the base OS, then use fbackup to create backup for vg01/vg02. am i right?

since it is the first time for me to restore a Unix system, if i run
#fbackup -vf /dev/rmt/0mn -i /data01 -i /data02

how can i restore them? just simply run the following command?
#frecover -x -oF -i /data01
#frecover -x -oF -i /data02


also how about the vg structure?

thx
Sajjad Sahir
Honored Contributor

Re: how to restore vg01

Dear Terry

ignite tool is using to take back up of the vg00 volume group.
once system is crashed u can bring back u system at minimum level from that backup

regarding other files u can use other backup tools like fbackup
once u used fbackup for backup then u can use frecover to restore the files
frecover -x -v -f /dev/rmt/0m
whiteknight
Honored Contributor

Re: how to restore vg01

Terry,

to restore the structure of lvm, you can use vgcfgrestore command.


WK
Problem never ends, you must know how to fix it
Bill Hassell
Honored Contributor
Solution

Re: how to restore vg01

> that means i need to make a vg00 backup for the base OS, then use fbackup to create backup for vg01/vg02. am i right?

Correct.

> since it is the first time for me to restore a Unix system, if i run
> #fbackup -vf /dev/rmt/0mn -i /data01 -i /data02

No, you run a complete backup of everything. If you need a fail restored that is on vg00, the Ignite backup tape is difficult to use as mentioned before. You perform full backups using fbackup and Ignite backups when vg00 has changed significantly. The fbackup command would be:

# fbackup -i / -v -c /etc/fbackup.cfg -f /dev/rmt/0m

The config file is required (unless you are using an archaiv 1/2" reel-to-reel magtape). This file would look soemthing like this:

blocksperrecord 4096
records 64
checkpointfreq 4096
readerprocesses 6
maxretries 5
retrylimit 5000000
maxvoluses 200
filesperfsm 2000

Put the file in /etc/fbackup.cfg and you'll maximum backup speed. Note that you can certainly make a separate backup tape of just /data01 and /data02 if you want, but having the entire system in a single backup makes it easier to find the right tape.

> how can i restore them? just simply run the following command?
> #frecover -x -oF -i /data01
> #frecover -x -oF -i /data02

No, the -oF options will cause major problems. -o will restore older files on top of newer files. Now for a complete loss of vg01, there are no existing files so the -o option would make no difference. But if you need to restore several files or complete directories where some files are missing but others are OK, you could accidently overwrite good files with old copies.

-F removes all the leading directories so all the files you request (ie, -i /data01) will be restored in the current directory (no directory tree at all) and that would be bad. -F should only be used to pull a file (or files) into a temporary directory. There is also another option, -X, which restores into the current directory. -F restores only the files (no leading directories) while -X restores the directory structure on the tape into the current directory.

So the correct frecover command (to restore /data01 and /data02) would be:

frecover -xvm -i /data01 -i /data02

You can use -i (and -e, if needed) as many times as you want. The -vm options will print progress information on the screen.

Here are some additional frecover command examples:

Display the tape header with dates:

frecover -V - -f /dev/rmt/0m

Display the table of contents:

frecover -I - -f /dev/rmt/0m

NOTE: To demonstrate (quickly) fbackup and recover commands, you don't have to use a tape device -- just specify a disk file such as -f /var/tmp/fb.test and backup/restore a few files for testing.


Bill Hassell, sysadmin
terry123
Regular Advisor

Re: how to restore vg01

thx all, i will test it on.
terry123
Regular Advisor

Re: how to restore vg01

according to Bill, i have successfully backup and restore my data, thx all