Operating System - Linux
1828317 Members
3430 Online
109976 Solutions
New Discussion

How can I write the header to tape?

 
Alfonso Rivera
New Member

How can I write the header to tape?

Would you please tell me how to write the tape header? I mean, how can I label tapes? Any special command for that?

Thanks,
I will appreciate any help.
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: How can I write the header to tape?

I let the utility writing to the tape handle that.

tar writes by default directly to tape.
cpio can with the right command line switches.

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
Balaji N
Honored Contributor

Re: How can I write the header to tape?

hi
not sure if this is what you mean.

what we do normally during tape backups for easy identification, is to create a file which contains the backup script and the list of files and add it as the first file on the tape.

-balaji
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Ralf Puchner
Honored Contributor

Re: How can I write the header to tape?

It depend on your tape system, but the "mt" command have some parameters to do that ;-)

Normally real backup software (taper, networker, veritas) will do the job automatically.


Help() { FirstReadManual(urgently); Go_to_it;; }
Sunil Sharma_1
Honored Contributor

Re: How can I write the header to tape?

Hi,
I don't think u can do it by using normal unix commands like tar,cpio and dd.
but the backup software like Veritas Netbackup, OB and Networker write header/labale on disks.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
John Meissner
Esteemed Contributor

Re: How can I write the header to tape?

I don't know about linux (still looking into this). but in HP-UX you can use a few utilities to do this.

make_medialif -in HP-UX this creates the boot image file. Several command line options will allow you to "name" the tape and give a discription as well as several others.

in Linux I don't belive this utility exists. I'm sure there is a comparable program though.
All paths lead to destiny
John Meissner
Esteemed Contributor

Re: How can I write the header to tape?

What application are you using to create the tapes? have you tried a 'man' on that command to see if there are options to name the tape or put a descriptor on it?
All paths lead to destiny
Alfonso Rivera
New Member

Re: How can I write the header to tape?

Thank you all. The idea is to develop our own backup software and we would like that each tape have a label created by us in order to administrate the tapes.
The idea of Balaji seems good to me, but how can I insert a file at the beginning of the tape?
Ralf Puchner
Honored Contributor

Re: How can I write the header to tape?

The first step of the backup software is to create a catalog with the data which must be saved to tape. This is the phase the decision "full" or "incremental" will be made.
So create a list and write it to the tape followed by the real data.

btw. have a look into the source of "mt" to see how to init a tape.

Help() { FirstReadManual(urgently); Go_to_it;; }