Link to home
Start Free TrialLog in
Avatar of hairylots
hairylotsFlag for Australia

asked on

IBM AIX SYSBAKP + CPIO to same tape

Hi
New to AIX.
We perform backups of the AIX rootvg using SYSBAKP comand and writes data to the rmt1 tape, data on the user VG is backed up using cpio to same tape.
SYSBAKP is run manually at 5:00 pm the cpio backup is run on cron at 11:00 pm to same tape.
Post cpio backup using listvgbackup to query tape I can see the SYSBAKP contents. Using cpio -itvcC1 < /dev/rmt1 I can see the table of contents for the cpio backup.

How can I be positive that cpio has not written over the top of SYSBAKP data on same tape?

Thanks in advance.
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Well,

if after cpio (which is the second step) you can still see sysbakp (first step) data then cpio obviously hasn't overwritten them! Additionally, if you can also see cpio date after listvgbackup they must be present, after all.

The most important thing (which you're certainly aware of) is using a "no rewind on close" (e.g. rmt1.1) device for
sysbakp and listvgbackup, so the tape won't get wound back to BOT after close.
Also the tape should of course not be unloaded manually inbetween.

Given this (no rewind and no manual unload) there is no reason why your method shouldn't work the desired way
(i.e.  without overwriting anything).

wmp

Looking at your command to read the cpio backup I would question the intgrity of your sysback tape.  In the command given your tape will rewind and begin reading at the beginning of tape.  If that is in fact true then your cpio backup has written over the bootable portion of your sysback.  Now if your cpio bckup is small enough it may just fit inside the first tape file created by your sysback thus when you go to read your sysback backup it will pass because your file marks allow it to line up.  

The big test is to boot one of your sysback tapes after the cpio has been run.

This is one of those areas that one can say "Yes it can be done"  But in reality "Should it be done?"  I have never believed it to be a good idea to mix backups to a single tape
P.S.>  If you are using sysback you should be able to backup the entire system (all volume groups, all mounted filesystems) unlike mksysb where you can only backup the mounted filesystems in the rootvg.

If you can backup everything that would be the way to go.
rmt1 alone performs a rewind on close, not on open!
Avatar of hairylots

ASKER

Hello All

Furher testing show that SYSBAKP  will not accept a rmt1.1 input.
Also is sysback the same as SYSBAKP?
Is there a way to determine tape position after sysbakp has completed?
Reason I ask, refer below for sysbakp session log, it has 3 references to rewind and also does not like the like the "<device_name>.1" reference.
Note the below output is from our dr system so rmt1 has changed to rmt0. Issuing rmt0.1 results in lsattr & chdev messages "device rmt0.1 not found".

=========session log=========
hostname\:/ >sysbakp

Admin T E C H N I C A L S U P P O R T

AIX Sysbakp

Admin Operating System Backup
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012

The sysbakp routine will backup the UNIX AIX operating system
to tape. This is a necessary process as it ensures timely
recovery from a system crash. It should be done at least once a
month, or at any time the operating system is changed.

To perform a FULL sysbakp you will need:

* A Tape labelled Emergency Sysbakp Tape

Press RETURN to continue, or press V and then RETURN to View your
last sysbakp details, or press Q and RETURN to quit sysbakp...

Please make your sysbakp choices
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012


You must now make your choices for the sysbakp process.
Please answer the following with y or n, or type q
to leave the sysbakp program.
Do you wish to create the Emergency Tape ? y
Are the above choices correct ? y

Emergency Recovery Tape Routine
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012


The sysbakp will now copy the operating system to tape.

You now need to enter the name of the tape drive that you wish to
use to do the backup. The following devices exist on your system...

rmt0 Available 00-08-00 SAS 1/2-inch Cartridge Tape Drive

Please enter tape drive name (rmt0,rmt1 ...)
or press RETURN for rmt0 : rmt0.1
lsattr: 0514-519 The following device was not found in the customized
device configuration database:
rmt0.1

Setting tape block size to 512...
chdev: 0514-519 The following device was not found in the customized
device configuration database:
rmt0.1
Emergency Recovery Tape Routine
Rewinding Tape...

SYSBAKP TAPE ROUTINE
====================

Your last sysbakp tape took 3 minutes to complete.
This backup started at 08:21.
Therefore the estimated tape completion time is 8:24.

Creating information file (/image.data) for rootvg.

Creating tape boot image..

Creating list of files to back up.
Backing up 63894 files............

63894 of 63894 files (100%)0512-038 mksysb: Backup Completed Successfully.

**** PLEASE REPORT ANY WARNING / ERROR MESSAGES TO Admin ****

Actual completion time 08:24. Press RETURN to continue...
chdev: 0514-519 The following device was not found in the customized
device configuration database:
rmt0.1

Please report any errors to Admin
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012
Sysbakp Tape Verify In Progress, please wait...

Saturday, January 07 2012
Block size set to 512

Rewinding Tape...

Verifying readability...

New volume on /dev/rmt0.1:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Sat Jan 7 08:22:32 EETDT 2012
Files are backed up by name.
The user is root.
The number of archived files is 63894.
Sysbakp Tape Verification Complete...

Saturday, January 07 2012
Block size set to 512

Rewinding Tape...

Verifying readability...

New volume on /dev/rmt0.1:
Cluster size is 51200 bytes (100 blocks).
The volume number is 1.
The backup date is: Sat Jan 7 08:22:32 EETDT 2012
Files are backed up by name.
The user is root.
The number of archived files is 63894.

Press RETURN to Continue:
chdev: 0514-519 The following device was not found in the customized
device configuration database:
rmt0.1

Create Rapid Recovery Files
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012




The sysbakp will now create the rapid recovery files.

Please wait...

Create Rapid Recovery Files
Sysbakp vAIX.00.07a on hostname

Saturday, January 07 2012
Recovery File Job
Recovery File Job Progress
=======================================
======================================= =============
Check existence of directories
Check existence of directories > Creating < 
Check existence of directories Completed
Copy rapid recovery files
Copy rapid recovery files > Copying < 
Copy rapid recovery files Completed


The copy of the rapid recovery files has completed.


Sysbakp Summary Screen
======================

Machine: hostname
Date: Saturday 07 January 2012
Sysbakp Version: vAIX.00.07a

Status of Emergency Sysbakp Tape Creation: ** COMPLETED **

Status of Sysbakp Tape Verification: ** COMPLETED
=========session log=========
No, sysbakp is not the same as sysback!

And yes, the "rmtx.y" devices are not listed by lsdev or lsattr.

It seems that sysbakp would just ask for the base device and would append the required suffix by itself as needed.

Since I'm not familiar with sysbakp I really can't tell you whether this tool performs a rewind at the end (according to the log you posted it doesn't ...)
There is unfortunately no way to determine the tape position.

The only way to make sure that nothing gets overwritten is to first rewind the tape to then space it forward the exact number of files so that it is finally positioned at the end of the sysbakp data.
The problem is that I don't know how many files to space forward.
Is there any sysbakp documentation of the tape layout which you could consult?

Once you found out the number of files ("n") you could use these two commands to position the tape before running cpio:

tctl -f /dev/rmt0 rewind
tctl -f /dev/rmt0.1 fsf n


You could make a little test beforehand by running your cpio -itvcC1 < /dev/rmt0 without the preliminary listvgbackup but after a forced rewind:

tctl -f /dev/rmt0 rewind
cpio -itvcC1 < /dev/rmt0

If you still see the cpio data your sybakp has been overwritten.
In this case you must either try the method I suggested above or use two cartridges ... ;-)

wmp



Hello woolmilkporc:

Your fedback is good and appreciated.
No documentation on sysbakp is available. New to AIX and also the applications platform this was inherited from previouse admin.

I will try your sysbakp --> tape rewind --> cpio process and see what the results are.
I know the cpio backup is 100GB+ so it wil not fit within the boot fsf# section of the tape.
With fsf is this an actual file reference or section of tape writting with mutilple files in that write sequence? The sysbakp of root vg reports 63000+ files backed up in what I understand is 3 write sequences, boot as FSF1, rootvg as FSF2 and emergency recovery as FSF3, then cpio as FSF4 in a 4 write sequence.
Reading over man tctl I amnot able to find a way to determine how many FSF# as recorded on a tape. Is there a way I can find how many FSF# are held on a tape?

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hello All

Thanks for your help. After further investigation it appears that sysbakp last command is to rewind tape, this results in cpio writing ove sysbakp data as tape is at start. For now I hav addional tapes allocated to sysbakp with application data on seperate tapes.
Handy information.