1850438 Members
3111 Online
104054 Solutions
New Discussion

Re: vgexport

 
SOLVED
Go to solution
John_1005
Advisor

vgexport

Could someone tell if vgexport -p -m -s would basically backup a volume group and its volumes? And could vgimport be used to restore a volume group? How is it different from a regular full backup? Also, what would be the best way to backup/restore specific directories in a volume? Thanks in advance.
12 REPLIES 12
Steven E. Protter
Exalted Contributor
Solution

Re: vgexport

vgexport backs up the volume group and logical volume information.

It does not back up the actual data as a full backup would do.

vgexport/import is used to save, recover and rebuild the information about the vg and logical volumes.

The process is not destructive and does not harm data. The data remains on the disk. The process does not back up the data in any way.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Geoff Wild
Honored Contributor

Re: vgexport

No - that is NOT a backup of data - all that does is create a map file of what the structure of the vg is...

Should be:

vgexport -p -s -v -m /tmp/vgXX.map

backup/restore - depends on your wallet - we use Veritas NetBackup.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Pete Randall
Outstanding Contributor

Re: vgexport

vgexport removes a vg from the system (unless run with the -p (preview) option, in which case it just goes through the motions and creates a map file) for the purpose of moving it to another system with vgimport. In no way could this be considered a backup.


Pete

Pete
John_1005
Advisor

Re: vgexport

it just goes through the motions and creates a map file) for the purpose of moving it to another system with vgimport.


Could you please tell what this means? If it is not a backup, then what's the purpose of moving it to another system? Thanks
Geoff Wild
Honored Contributor

Re: vgexport

Say you want to mount the vg on a backup server - so that it backups locally to tape instead.

That's when you would do a vgexport/vgimport...

Also - in a clustered environment - to setup shared vg's.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor

Re: vgexport

Yes Anand, but thats not a backup.

A backup implies copying the data OFF the disk. vgexport does NOt do that.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
John_1005
Advisor

Re: vgexport

Thanks everyone. Should the vgexport be done onto the tape?
Steven E. Protter
Exalted Contributor

Re: vgexport

no

vgexport simply back up the volume group and lvm structure and removes the volume group.

data remains on disk and the disks can be imported to the same system or another system, depending on the cable/scsi setup.

vgexport will not create anything on tape.

Before you start

make_tape_recovery

That will back up the lvm/vg information to tape.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: vgexport

I don't think you're getting the point here. There's no tape involved. When you run vgexport, it simply disconnects the VG from it's current system. All traces of the VG are removed and the VG is then available to be imported onto another system or back onto the same system.

In order to import it, you go through the following procedure:

mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -s -m /tmp/vg01map /dev/vg01
vgchange -a y /dev/vg01

This assumes vg01 but it could be any VG.


Pete

Pete
John_1005
Advisor

Re: vgexport

Sorry. Then, I think just

vgexport -p -s -v -m /tmp/vgXX.map

and save the map file in a safe place? I really donot need to export & import. I think the above command is sort of like metadata.
Pete Randall
Outstanding Contributor

Re: vgexport

Yes, with the -p (preview) option, it will save a map of the LVM configuration (or metadata in your terms) in the file you specify.


Pete

Pete
renarios
Trusted Contributor

Re: vgexport

Hi Anand,

You can create a mapfile with vgexport, copy to another server and use the mapfile with vgimport to create a same vg there.
The command is being used for clustered servers connected to a storage area networks (SANs).
Don't just do some vgexport experiments, becuase you can throw away your vg configuration with that command too!
To get it visualized, try this presentation: http://docs.hp.com/en/144/app_consolidation.pdf

Cheers,

Renarios
Nothing is more successfull as failure