Operating System - HP-UX
1752782 Members
6036 Online
108789 Solutions
New Discussion юеВ

Can one put custom volume info on tape with fbackup

 
SOLVED
Go to solution
Daniel Robert
Frequent Advisor

Can one put custom volume info on tape with fbackup

I was truying to find a parameter to use, to no avail, to enable me to put custom volume information on the tape qith fbackup.

The reason I want to do this is that I want to create a procedure, just before the backup starts, to verify that the correct day of the week tape is in the drive. Every night we do a full system backup and we don't use incrementals.

I thought that if I was able to idenfity the tape in the header, I would read it to verify that the right on is in the drive.

Is there such a parameter or is there another way of accomplishit this?
12 REPLIES 12
Adam W.
Valued Contributor

Re: Can one put custom volume info on tape with fbackup

Daniel,
What do you mean by "custom Volume Information?"
There are two types of people in the world, Marines and those who wish they were.
James R. Ferguson
Acclaimed Contributor

Re: Can one put custom volume info on tape with fbackup

Hi:

You aren't going to be able to customize the volume information, but you can easily read the standard information:

# frecover -V /dev/tty -f /dev/rmt/0m

...will list the volume header information on your terminal. This include the date of the backup, the user who performed it, and the hostname on which it was made.

Regards!

...JRF...
Daniel Robert
Frequent Advisor

Re: Can one put custom volume info on tape with fbackup

Basically want to put "Mon" or "Monday" on the tape header to indicate that it is in fact the Monday tape in the drive.

We use the following tapes in rotation:
Daily rotation: Sunday, Monday, Tuesday, Wednesday, Thursday and Friday.
Weekly Rotation: Saturday1 Saturday2, Saturday3, Saturday4 (Saturday1 does not necessarily represent the first Saturday, etc).
We also do monthly backups which are done on the 1st of the month overriding whatever tape that was normally to be used. Ex: on Dec. 1st 2008, we would use the December Tape instead of the Monday tape.

This is why I want ot create a script to verify what is in the drive to ensure that the operator inserted the right one.
Daniel Robert
Frequent Advisor

Re: Can one put custom volume info on tape with fbackup

Oops... I meant we would use the _November_ tape on Dec. 1st... not that it really matters.
James R. Ferguson
Acclaimed Contributor
Solution

Re: Can one put custom volume info on tape with fbackup

Hi (again) Daniel:

> This is why I want ot create a script to verify what is in the drive to ensure that the operator inserted the right one.

Your script could began by running:

# frecover -V /tmp/fbackup.$$ -f /dev/rmt/0m

Now, parse the /tmp/fbackup.$$ file which contains your volume header information. The line beginning with "Time:" gives you the timestamp of the backup. Parse and apply whatever rules you need. If you don't want to reuse this tape, issue a message and unmount the tape:

# mt -f /dev/rmt/0m offl

...otherwise begin a new 'fbackup' using the mounted tape.

Regards!

...JRF...
Daniel Robert
Frequent Advisor

Re: Can one put custom volume info on tape with fbackup

Hum, maybe I didn't explain my problem properly... basically I want to do what I can do with tar. With tar I can specify a volume name with the -V option this I can retrieve and use to determine the name of the tape.

I was aware that I was able to get the volume information from frecover, but the fact is that this information is what the system decided should be in this tape volume and it does not contain the data that I need to identify the tape... unless I am missing something where I _can_ define what can be put in the tape header (similar to "tar -VMonday ...")
James R. Ferguson
Acclaimed Contributor

Re: Can one put custom volume info on tape with fbackup

Hi (again) Daniel:

As I first said:

You aren't going to be able to customize the volume information.

I suppose that your script could write its own information file; and then, include this file in its fbackup session.

To identify the tape, 'frecover' only this file; parse its contents; decide what you want to do; and either use the mounted tape to perform another 'fbackup' (with an updated information file about it) or rewind and unmount the tape.

Regards!

...JRF...
Daniel Robert
Frequent Advisor

Re: Can one put custom volume info on tape with fbackup

Thanks James. That would be a solution. I just thought that it would be as simple as the way tar works. Oh well, who says that things should always be easy.
Daniel Robert
Frequent Advisor

Re: Can one put custom volume info on tape with fbackup

Ooops, forgot to close the thread.

Thanks again James.