Operating System - HP-UX
1838612 Members
2675 Online
110128 Solutions
New Discussion

How to retain the tape label after an IGNITE-UX backup

 
Nick Zraika
Frequent Advisor

How to retain the tape label after an IGNITE-UX backup

To all you HP Guru's out there :)

The situation is this:

I have 3 scripts. I performs a tape shout which alerts the operator to insert the tape(this is fine) the second performs a tapecheck which determines if the "correct" tape is loaded by reading the label on the tape (this is fine before an Ignite backup runs). finally there is the Ignite script which basically runs if the 2 previous conditions (scripts) have been met.

How can i work around retaining the label? Each time the ignite runs the label gets lost. I have tried the following to no avail:

I have tried fast forwarding the tape (just before the ignite starts (hoping it will skip the label) using
mt -f /dev/rmt/1mn fsf 2
this was unsuccessful.

I tried inserting the label in the ignite command itself after the "-t" option. However after the backup completed when i issued my command to check the label i.e.
dd if=/dev/rmt/1mn count=1 bs=1024
it was not there.

If anyone can shed some light here that will be VERY much appreciated, i have been scratching my head on this for quite some time :)

p.s the command i am using to write the label to the tape is:
dd if=/tmp/month_ignite_label of=/dev/rmt/1m conv=sync
the label is inserted in the /tmp/month_ignite_label file by the tape shout script.


Nick
'Everything is do-able'
11 REPLIES 11
Steven E. Protter
Exalted Contributor

Re: How to retain the tape label after an IGNITE-UX backup

From the man page:

/opt/ignite/bin/make_tape_recovery [ -s Ignite-UX_server ]
[-a tape_drive] [-A] [-b] [-B boot_destination_file]
[-d tag_string] [-f content_file] [-i|-ib] [-I] [-l LLA]
[-n number_cfg_directories] [-p] s|w|e] [-m tar|cpio] [-r]
[-t tape_title_string] [-v] [-x content-options]
[XToolkit_Options] [-?]



Try the -t tape_title_string option

or -d tag_string

One of those two will probably create the tape with the label you wish.

You will have to give it a try to see if I'm correct.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nick Zraika
Frequent Advisor

Re: How to retain the tape label after an IGNITE-UX backup

Thanks for your prompt respone, unfortunately as i stated above, i tested with the -t flag however after the ignite completed i could not read it.

I issued a:

dd if=/dev/rmt/1mn count=1

was expecting to see the label but nothing appeared except for

0+0 records in
0+0 records out

Haven't tried the -d flag? will give it a try.
'Everything is do-able'
Ranjith_5
Honored Contributor

Re: How to retain the tape label after an IGNITE-UX backup

Hi Nick,
When ever I need a tape with either of the following command and it works normally:

make_recovery -ACvi -d /dev/rmt/ -t "Ignite of on set#"

OR

make_tape_recovery -ACvi -d /dev/rmt/ -t "Ignite of on set#"


regards,
Syam
Steven E. Protter
Exalted Contributor

Re: How to retain the tape label after an IGNITE-UX backup

Your results may have been bad media.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Nick Zraika
Frequent Advisor

Re: How to retain the tape label after an IGNITE-UX backup

Sorry guy's seems like we are slowly skipping the issue here.

I know totally understand the make_recovery and make_tape_recovery commands and their options. That is not my problem. The problem is when an Ignite backup runs, it "overwrites" the "label".

I mentioned above how i set the label. Now when i use the "-t" flag and insert a description, i cannot read it?

I guess my question to you would be then, Can you read your -t "Ignite of on Date" information after the backup completes? if so how?

Thanks.
Nick
'Everything is do-able'
Ranjith_5
Honored Contributor

Re: How to retain the tape label after an IGNITE-UX backup

Hi nick,

The -d option is for specifying the backup device, in case you have more than one dirve is there in your machine. By default it goes to /dev/rmt/0m, but if u wanna take a backup on say, /dev/rmt/6m then -d option comes as follows.

# make_tape_recovery -ACvi -d /dev/rmt/6m -t "Ignite of on set#"

Another option what you can try is taking ignite with a GUI interface.
Install exceed EXCEED software in your windows desktop.
Telnet to the ignite server.
do export DISPLAY=:0.0
ignite &
Go to action menu --> select either tape / net recovery options --> follow the onscreen procedure.

Regards,
Syam
Sridhar Bhaskarla
Honored Contributor

Re: How to retain the tape label after an IGNITE-UX backup

Hi Nick,

You will need to extract the LIF area and run 'instl_adm -F' against it. If you used '-t' option to write the label, it will be recorded there I believe. Atleast, I am sure sysadmin_message will be there that you can make use of. Use copy_boot_tape or 'dd' to retrieve the LIF area.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Nick Zraika
Frequent Advisor

Re: How to retain the tape label after an IGNITE-UX backup

Sridhar,

I think i'm getting onto something with your recommendation.

you mentioned: extracting the LIF area and run 'instl_adm -F' against it to see the contents of my -t info.

Can you give a step by step process to achieve this?

Do i just run instl_adm -F (do i need any flags?)

Please elaborate.

Cheers
Nick
'Everything is do-able'
Sridhar Bhaskarla
Honored Contributor

Re: How to retain the tape label after an IGNITE-UX backup

Nick,

This will be a slow process. You can use either copy_boot_tape or dd to recover the LIF image. I will give the 'dd' syntax. You can incorporate it into your script.

#mt -t /dev/rmt/0m
#dd if=/dev/rmt/0mn of=/tmp/lifarea bs=2k
#lifls /tmp/lifarea
If it is successful (return code 0), then do
#MESSAGE=$(instl_adm -F /tmp/lifarea |awk '/sysadm_message/ {FS="=";print $2}')
echo $MESSAGE

If you wrote a meaningful and flexible title something like "boot_tape_week2: created on some date..", then you can further process $MESSAGE to extract boot_tape_week2 string and check if it is correct tape or not.

However, the problem with this approach is that it can take some time to extract the lifarea as well you need some free space in /tmp (or any filesystem you choose).

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Nick Zraika
Frequent Advisor

Re: How to retain the tape label after an IGNITE-UX backup

Sounds good, i will give it a go and let you know how it goes....

cheers
Nick
'Everything is do-able'
Nick Zraika
Frequent Advisor

Re: How to retain the tape label after an IGNITE-UX backup

Sridha,

YOUR THE MAN!

thanks mate it did the job! and surprisingly was quite quick (the space is no issue either)

Thanks again.

Case closed!

Regards
Nick
'Everything is do-able'