1833137 Members
3584 Online
110051 Solutions
New Discussion

tar and cpio in one tape

 
Sundar_7
Honored Contributor

tar and cpio in one tape


Is it possible to take both tar and cpio archieves in one tape..

First TAR it then use mt to position and then use cpio..

Will it work ?

I cannot really test it out as I dont have access to Tape Drive..

Has anybody done it or sure it will work or not ?

Please let me also know

Sundar
Learn What to do ,How to do and more importantly When to do ?
3 REPLIES 3
Stefan Farrelly
Honored Contributor

Re: tar and cpio in one tape



Yes it will work, just dont forget to use the non rewind option when accessing the drive.
Im from Palmerston North, New Zealand, but somehow ended up in London...
Magdi KAMAL
Respected Contributor

Re: tar and cpio in one tape

Hi Sandara,

I would say yes you can. You do not need a mt command after tar since you use the no-rewind in "#mn" :

1. tar /dev/rmt/#mn
2. cpio

But don't forget to restaure in the same order
1. tar /dev/rmt/#mn
2. cpio


Magdi
Bill Hassell
Honored Contributor

Re: tar and cpio in one tape

I would caution you very strongly not to try to save tapes by appending backup sets onto a single tape. There are no tools to prevent you (or another user) from destroying all the backups. Also, it is quite tricky to document exactly what is on the tape and when it was stored.

In fact, just using the wrong device file will destroy all appended data. The command to use for positioning a tape is mt but be sure to read the WARNINGS. Also, read the man page for mt(7) with:

man 7 mt

You must use a Berkeley, no-rewind device and I would write some test scripts to verify that the data on the tape is what you expect.

Because a backup is insurance against a future problem, using one tape for multiple backups is like purchasing cheap insurance...it doesn't payoff when it is needed most.


Bill Hassell, sysadmin