Operating System - HP-UX
1833790 Members
2809 Online
110063 Solutions
New Discussion

cpio and multiple backups on one tape.

 
Chris Jones_4
Occasional Contributor

cpio and multiple backups on one tape.

Hi,
I'm using cpio to make multiple backups on a single tape using cpio (cpio -ocv) with the no-rewind device.
I've successfully restored particular backups using mt to position the tape and cpio (cpio -ivcd).

This all works fine but on restore I always get the 'cpio: unable to autoload next media'. This is irritating. Can I avoid this message? (my backups are restored OK despite this message).

P.S. Take it as given that I have to use cpio and a single tape. I'm using an IBM DLT tape drive.

Thanks for any help.
Doh!
2 REPLIES 2
Jim Turner
HPE Pro

Re: cpio and multiple backups on one tape.

Hi Chris,

I understand your caveat, but I'll still say it: Don't put multiple archives on one tape. It's like putting your cactus next to your alarm clock -- you can do it, but it's not a good idea.

If this error is benign to you, you can redirect stderr to /dev/null to quiet things down. Alternately, you might want to redirect stderr to a file so that you can check for legitimate errors, too.

All the best,
Jim
A. Clay Stephenson
Acclaimed Contributor

Re: cpio and multiple backups on one tape.

Hi Chris:

I suggest that you switch to the 'Berkeley' style no rewind devices. e.g. /dev/rmt/2mnb

The difference is the way the EOF marks are written. Man mt(7) for details. When I used the 'mnb' devices no errors appeared. I would use these devices for both the mt and cpio command. I also suspect you might be able to improve your backup performance by piping cpio through dd to increase buffering although it is very difficult to keep a DLT streaming with tar or cpio.


Regards, Clay
If it ain't broke, I can fix that.