World is Welcome To The World of Linux

Journey into the world of linux

Menu
  • About
  • Welcome
Menu

Restoring Files From Aix mksysb Backup

Posted on March 31, 2009 by Ganesh Sharma

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

You may be aware that the mksysb command creates the bootable image of all the mounted files systems on rootvg, at the time of creation of mksysb image. Here I am going to discuss how to restore data from mksysb backup image. I’ll discuss how to restore single file, multiple files and directories from mksysb backup image.

Those interested in knowing more about mksysb backup image contents can read my earlier article What is mksysb And What Are Its Components. For those who want to read all of my aix backup articles can follow backup link in categories list shown on this page. Just to be brief, backup resides in the fourth file image on the tape. First three are BOS boot image, mkinsttape image and dummy TOC.

Restoring Data From The mksysb Image

Restoring A Single File From mksysb Image

Let’s say you want to restore a file /etc/rc from mksysb image from tape /dev/rmt1. Now you have to follow the following procedure:

  1. Rewind the tape back to starting position.
  2. Skip the first 3 parts of mksysb image.
  3. Extract the file from the 4th part of the mksysb image.

Rewind The tape: tctl -f /dev/rmt1 rewind

Restore the file: restore -x -d -q -s4 -f /dev/rmt1.1 ./etc/rc

-s4 Signifies that we seek 4th image on the tape, where the backup resides.

Use rmt1.1, means no rewind on close and no retension on open.

Note the ./etc/rc, the “.” is a must, because all paths are absolute and not relative.

If the backup was taken with -i flag, you can use the following command:

restore -x -d -v -q -f /dev/rmt1 /etc/rc

You have to use -d flag.

If the mksysb backup was taken with file system backup, you can use the following command:

restore -x -v -q -f /dev/rmt1 /etc/rc

Restoring A Directory File From mksysb Image

Let’s say you want to restore a full directory /var/adm from the mksysb archive on /dev/rmt1. Here you have to specify the directory name instead of a single file:

Rewind The tape: tctl -f /dev/rmt1 rewind

Restore the file: restore -x -d -s4 -f /dev/rmt1.1 ./var/adm

Similarly if the backup was taken with -i option then it will be:

restore -x -d -v -q -f /dev/rmt1 /var/adm

If the backup was taken with filesystem backup option then it will be:

restore -x -v -q -f /dev/rmt1 /var/adm

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • Date Command Tutorial(Video)
  • grep Command Tutorial – 1(Video)
  • Introduction To ls Command(Video)
  • Chapter 3
  • Set Position Of Poll Module Into Joomla

Recent Comments

  • Kansas City Trailer Proz on Physical Volume In AIX – A Primer
  • Create volume group in AIX | myunixsheet on How To Create Volume Group
  • Restore of AIX backup on other Unix system - TecHub on What is mksysb And What Are Its Components
  • Firewall Unleashed - InfoSec Institute on Packet Filtering Firewall: An Introduction
  • Manwendra on Proxy Firewall and Gateway Firewall: Introduction

Archives

  • January 2019
  • June 2010
  • May 2010
  • February 2010
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Categories

  • 30 Days To Joomla WebSite Setup
  • A Journey To The World of Linux System Administration
  • Aix
  • Backups
  • Books
  • Firewalls
  • Introduction
  • Joomla
  • Joomla Backup
  • Joomla Web Technology
  • Linux
  • LPAR and Virtualization
  • LVM
  • Pluggable Authentication Modules
  • section navigator pro
  • Security
  • Security Knowledge Base
  • Tips and Tricks
  • Uncategorized
  • World is Welcome Products

Meta

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org
©2023 World is Welcome To The World of Linux | WordPress Theme by SuperbThemes