World is Welcome To The World of Linux

Journey into the world of linux

Menu
  • About
  • Welcome
Menu

How To Use mksysb Command

Posted on March 30, 2009 by Ganesh Sharma

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

Here I am going to discuss what you can do with the mksysb command. But before proceeding further let’s have a look on important command line options. Consult mksysb man page from IBM for more information.

-a         Specifying this option won’t backup extended attributes and NFS4 ACLs.
-b         How many number of 512-byte blocks to write in a single output operation.
-e         Excludes files listed in /etc/exclude.rootvg file from backup.
-F         If you want to use previously created mksysb image to create backup tape.  Backup tape is made bootable if possible. It’s a must with a tape backup.
-i          Specifying this option calls mkszfile to generate /image.data file. The file /image.data will have information of VG, LV, FS, PV and Paging space.
-m        Specifying this option calls mkszfile with -m flag to generate map files. No use of -i is needed with this option.
-p         This instructs to not to use any kind of compression algorithms.
-t argument
The option specifies the path where the image will be created from mksysb file specified by -F flag. If you don’t specify then /tmp is used.
-v         Verbose mode. All files being backed up will be listed.
-V        It verifies a tape backup. File header of each file on backup tape is verified.
-X        Auto expand /tmp file system if needed.

1. Generating system backup and creating /image.data file on tape drive /dev/rmt0

mksysb  -i /dev/rmt0

2. Generating system backup and creating /image.data file on tape drive /dev/rmt0 with map files:

mksysb  -m /dev/rmt0

3. Generating system backup and creating /image.data file on tape drive /dev/rmt0 and producing verbose output . Also exclude /home/user1/my_dir.

mksysb  -i  -e  -v  /dev/rmt0

Also create a file /etc/exclude.rootvg and enter file name as: /home/user1/my_dir/
Note the ending slash.

4. Generating system backup and creating /image.data file in file /my_backups/backup_image

mksysb  -i /my_backups/backup_image

5. Generating system backup and verifying backup image.

mksysb  -i /dev/rmt0 -V

How To Schedule mksysb
Let’s say we choose to schedule daily mksysb schedule. Say you want to take mksysb backup daily at 04:20 Hours. You need to follow the following steps:

  1. Create a file named anything like mksysb_sched in your home directory. So the file will be something like: /home/user1/mksysb_sched.
  2. Give it permissions like 755 as follows:  chmod 755 mksysb_sched
  3. Run the command:    crontab -e
  4. Make entry: 20   04  *   *  *   /home/user1/mksysb_sched

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