View mksysb content & restore individual files

View mksysb content & restore individual files

To view information about a mksysb backup file use:

            Display info about VG backup
            |
# lsmksysb -lf P2_1202_TL7.mk 
             |             |
             |             Mksyb file
             Device:(file,tape,cdrom) 
VOLUME GROUP:           rootvg
BACKUP DATE/TIME:       Tue Feb 21 18:08:29 GMT+01:00 2012
UNAME INFO:             AIX power2s 1 6 00C4489D4C00
BACKUP OSLEVEL:         6.1.7.0
MAINTENANCE LEVEL:      6100-07
BACKUP SIZE (MB):       41216
SHRINK SIZE (MB):       8421
VG DATA ONLY:           no

rootvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
hd6                 paging     16      32      2    open/syncd    N/A
hd5                 boot       1       2       2    closed/syncd  N/A
hd8                 jfs2log    1       2       2    open/syncd    N/A
hd3                 jfs2       4       8       2    open/syncd    /tmp
hd1                 jfs2       1       2       2    open/syncd    /home
hd11admin           jfs2       1       2       2    open/syncd    /admin
livedump            jfs2       2       4       2    open/syncd    /var/adm/ras/livedump
fslv00              jfs2       72      144     2    open/syncd    /usr/sys/inst.images
hd4                 jfs2       22      44      2    open/syncd    /
hd2                 jfs2       34      68      2    open/syncd    /usr
hd9var              jfs2       2       4       2    open/syncd    /var
hd10opt             jfs2       5       10      2    open/syncd    /opt

To get the LPP info from the mksysb use:

            Display LPP info
            |
# lsmksysb -Lf P2_1202_TL7.mk
                   |
                   Mksysb file
Fileset                      Level  State  Type  Description (Uninstaller)
  ----------------------------------------------------------------------------
  ICU4C.rte                  6.1.7.0    C     F    International Components for
                                                   Unicode
  Java5.sdk                5.0.0.430    C     F    Java SDK 32-bit
  Java5_64.sdk             5.0.0.430    C     F    Java SDK 64-bit
  Java6.sdk                6.0.0.280    A     F    Java SDK 32-bit
  Tivoli_Management_Agent.client.rte
                             3.7.1.0    C     F    Management Framework Endpoint
                                                   Runtime"
  X11.adt.bitmaps            6.1.0.0    C     F    AIXwindows Application
                                                   Development Toolkit Bitmap
                                                   Files 
  X11.adt.imake              6.1.6.0    C     F    AIXwindows Application
                                                   Development Toolkit imake
.....

For the list of files contained in the mksysb

# lsmksysb -f P2_1202_TL7.mk
      6666 ./bosinst.data
          11 ./tmp/vgdata/rootvg/image.info
       11861 ./image.data
      187869 ./tmp/vgdata/rootvg/backup.data
           0 ./opt
           0 ./opt/IBM
           0 ./opt/IBM/perfpmr
        2249 ./opt/IBM/perfpmr/Install
        2616 ./opt/IBM/perfpmr/PROBLEM.INFO
        9818 ./opt/IBM/perfpmr/README
       26741 ./opt/IBM/perfpmr/config.sh

A specific file from the mksysb backup can be restored using the restorevgfiles command. In the following example the file will be restored to the current directory (/tmp/restore). Using the -d flag a alternative restore location can be specified.

                                 Path to the mksysb image file
                                 |
(/tmp/restore) # restorevgfiles -f /export2/P2_1202_TL7.mk ./root/j1
                                                             |
                                                             The file to be extracted from the mksysb image.
New volume on /export2/P2_1202_TL7.mk:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Tue Feb 21 18:09:12 GMT+01:00 2012
Files are backed up by name.
The user is root.
x            6 ./root/j1
The total size is 6 bytes.
The number of restored files is 1.
==================================================================
(/tmp/restore) # ls -la */*
-rw-r--r--    1 root     system            6 Feb 17 11:16 root/j1
0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Install and configure GNU watch (gwatch) on AIX
Viewed 7512 times since Thu, Feb 21, 2019
List AIX File Systems the Easy Way With the lsvgfs Command
Viewed 1755 times since Thu, Sep 20, 2018
AIX - How to get Memory infomation
Viewed 8731 times since Fri, Jun 8, 2018
How to determine why your AIX oslevel is downlevel (and a script to help!)
Viewed 3608 times since Fri, Jul 13, 2018
AIX PDF ALL
Viewed 6250 times since Mon, Jul 16, 2018
AIX NFS Version 4 configuration over Kerberos inter-realm setup
Viewed 3636 times since Wed, Jun 27, 2018
Part 3, Tuning swap space settings AIX7
Viewed 8775 times since Wed, Jun 19, 2019
How to upgrade TL and SP in AIX using alternate disk(alt_disk_copy)
Viewed 10487 times since Sun, Jun 30, 2019
Using splitvg in AIX to make a copy of a volume group
Viewed 8365 times since Mon, Jun 3, 2019
AIX: How to identify the program listening in the given port
Viewed 2202 times since Mon, Jun 11, 2018