Unix/Linux Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

AIX's restorevgfiles

AIX


Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-11-2017   -   Original Discussion by kwliew999
kwliew999 kwliew999 is offline
Registered User
 
Join Date: Jun 2007
Last Activity: 11 August 2017, 5:46 AM EDT
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
AIX's restorevgfiles

Seek help from all experts,
I understand that if I perform a savevg on a VG, and later perform a restvg to another hdisk, I will get back a exact same VG that I perform savevg earlier. It will be identical even on permission bit, owner and group.
However, if I perform a restorevgfiles for a filesystem from the same savevg file, will I get a identical filesystem? In terms of permission and owner and group will be identical as well?
Sponsored Links
    #2  
Old Unix and Linux 08-11-2017   -   Original Discussion by kwliew999
rbatte1 rbatte1 is offline Forum Staff  
Root armed
 
Join Date: Jun 2007
Last Activity: 21 November 2017, 4:50 AM EST
Location: Lancashire, UK
Posts: 3,370
Thanks: 1,454
Thanked 665 Times in 598 Posts
Firstly, the restore would need to be to a server that does not have this volume group. I don't think you can clone to the same server because there would be naming conflicts.

The restvg command requires a suitable number of PVs to restore to and these are completely consumed by the process, although that might mean there is free space within the recovered volume group.

To get us to a known point, can you confirm how you saved the volume group (did you exclude any files?) along with any information about the original you have, e.g. number & size of logical volumes and if they are mirrored, PP size,

We would then need to know the target disks and if there are any naming conflicts for the target server. The PV names to restore to can differ from the original. We will need to know quite a lot to work out how to help.




Kind regards,
Robin
Sponsored Links
    #3  
Old Unix and Linux 08-12-2017   -   Original Discussion by kwliew999
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 15 November 2017, 4:57 AM EST
Location: In the leftmost byte of /dev/kmem
Posts: 5,633
Thanks: 107
Thanked 1,603 Times in 1,180 Posts
Quote:
Originally Posted by kwliew999 View Post
restvg to another hdisk, I will get back a exact same VG that I perform savevg earlier.
Not exactly. You don't need to have exactly the same physical volumes (i.e. they need to be big enough to hold all the LVs but might be bigger than their originals), etc.. They just need to be able to accomodate the VGs needs. That means: if you have i.e. LVs with copies and "strict" as a rule you need two disks so that the copies can go on different disks and similar.

savevg is using the backup command to save the files themselves (this backup image is part of the savevg image and if you know what you are doing you can even pull out single files from it using the restore command).

In fact savevg works exactly the same way as mksysb (minus the boot code, etc., because the base mksysb image is created by doing a savevg rootvg) which we have described several times in this forum.

I hope this helps.

bakunin
    #4  
Old Unix and Linux 08-16-2017   -   Original Discussion by kwliew999
MichaelFelt MichaelFelt is offline
Registered User
 
Join Date: Nov 2012
Last Activity: 8 September 2017, 10:55 AM EDT
Location: on the road for work; home is private time
Posts: 441
Thanks: 8
Thanked 104 Times in 98 Posts
Quote:
Originally Posted by kwliew999 View Post
Seek help from all experts,
I understand that if I perform a savevg on a VG, and later perform a restvg to another hdisk, I will get back a exact same VG that I perform savevg earlier. It will be identical even on permission bit, owner and group.
However, if I perform a restorevgfiles for a filesystem from the same savevg file, will I get a identical filesystem? In terms of permission and owner and group will be identical as well?
As bakunin mentions the commands mksysb and savevg are scripts that act as "front-ends" and are able to collect and record information needed to recreate an "identical" copy during restore.

a) it is not advisable to restvga volume group that you have saved, but not removed. While it may be possible to provide an argument to give the volume group a new name, by default restvg wants to re-create the same logical volume names. As the original volume group exists - this is not acceptable and AIX will rename to logical volumes and your "restore" is no longer identical at the volume group level.

b) as to restore files from a "bff" (backup file format) file - these files will have identical information in the inodes - again, at a binary level - not necessarily at a user level. If UID and GID (i.e., /etc/password and /etc/group) are identical on "both" servers, the restore will appear identical, if the USER/GROUP information is not identical - the restored files will not appear as identical. At a binary level - they are identical.

In short, when you need identical information at an INODE level (i.e, OS specific knowledge about special files and/or ACL, permission bits (e.g., tcb-bit) use the commands backup and restore for saving files, not applications such as ftp, scp, cpio, tar, rsync as they do not copy inode data at an OS level. They might work for an AIX to AIX copy, but there is no guarantee.

p.s. - if you goal is to copy a filesystem, e.g., through a pipe - feel free to look at a script I used (I generally just typeLinux

Code:
# find . | backup -if - | (cd /some/where/new; restore -xqf -)

Look at: http://www.rootvg.net/content/view/301/309/ (from 2009!)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Using restorevgfiles to restore entire directory from rootvg problems herot AIX 10 08-28-2012 04:28 PM



All times are GMT -4. The time now is 08:12 AM.