Operating System - HP-UX
1753512 Members
5740 Online
108795 Solutions
New Discussion юеВ

Re: Coping files to a tape drive using cpio command

 
SOLVED
Go to solution
Tumeshwarie Udai
Occasional Contributor

Coping files to a tape drive using cpio command

I need send a big file (2.5 Gb) to a Data Cartridge Tape.

I do not have problems sending files smaller than 2GB.

This is the command I am using.
ls swxtab.dmp | cpio -ocvBd -O /dev/rmt/0

Can anyone help me?
Someone suggested that the tape drive cannot support more tahn 2 GB. But I don't think so.
This is the error message reported.
cpio: swxtab.dmp: too large to archive in current mode
8 REPLIES 8
Rodney Hills
Honored Contributor

Re: Coping files to a tape drive using cpio command

Could you use the "split" command to break up the one large file into several not so large files?

Then you could use cpio to copy them to tape.

HTH

-- Rod Hills
There be dragons...
Peter Godron
Honored Contributor

Re: Coping files to a tape drive using cpio command

Hi,
can compress the file before backing up. Alternatively, can you use fbackup?
Ivan Ferreira
Honored Contributor

Re: Coping files to a tape drive using cpio command

What if you use fbackup or dd instead of cpio? I think that is a limitation of the command.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: Coping files to a tape drive using cpio command

add on to above answers

cpio is not supported over 2 Gbytes!

You could use tar/gtar/pax.

Best regards,
Robert-Jan
Peter Godron
Honored Contributor

Re: Coping files to a tape drive using cpio command

Checking the man pages for cpio proves Robert_Jan's answer:

man cpio

" WARNINGS
Because of industry standards and interoperability goals, cpio does
not support the archival of files larger than 2GB or files that have
user/group IDs greater than 60K."
A. Clay Stephenson
Acclaimed Contributor

Re: Coping files to a tape drive using cpio command

The problem is not the tape drive but the cpio command itself. Cpio is decades old and has a 2GB filesize limit. If this is an HP-UX to HP-UX transfer then you can use fbackup/frecover; if not, then most versions of tar also have a 2GB limitation. If you can use the freely available Gnu version of tar on both machines then that will be a viable solution. If not, you can use the split command to break your file into smaller pieces and then cpio those files. They can be reassembled at the receiving end via the cat command. The "gotcha" here is that not all versions of split work on binary files (although HP's does). The is also a freely available version of split (bsplit) that does work on binary data.

Gnu tar and bsplit for HP-UX are available from any HP-UX Porting Centre.

http://hpux.cs.utah.edu/hppd/hpux/Gnu/tar-1.15.1/
http://hpux.cs.utah.edu/hppd/hpux/Networking/Misc/bsplit-2.02/

If you need these utilities for another OS the visit www.gnu.org.
If it ain't broke, I can fix that.
Tumeshwarie Udai
Occasional Contributor

Re: Coping files to a tape drive using cpio command

Thanks for all help and quick responses I received.

I tried the tar command to copy the dump to tape and it worked.
#tar cvf /dev/rmt/0 swxtab.dmp

I tried restoring using the following command to verify.
#tar xvf /dev/rmt/0


Thanks
Tumeshwarie Udai.
Tumeshwarie Udai
Occasional Contributor

Re: Coping files to a tape drive using cpio command

Thanks for all help and quick responses I received.

I tried the tar command to copy the dump to tape and it worked.
#tar cvf /dev/rmt/0 swxtab.dmp

I tried restoring using the following command to verify.
#tar xvf /dev/rmt/0


Thanks
Tumeshwarie Udai.