LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Other *NIX (https://www.linuxquestions.org/questions/other-%2Anix-55/)
-   -   CPIO Backup End of Media (https://www.linuxquestions.org/questions/other-%2Anix-55/cpio-backup-end-of-media-668201/)

rma1 09-07-2008 05:28 PM

CPIO Backup End of Media
 
I'm having problems getting backups working on SCO OpenServer 5.7.

using the following command:

find / -depth -print | cpio -ocvB -O /dev/rct0

some files are backed up then the following error is reported:

Reached end of medium on output.
Device /dev/rct0: Change to part 2 and press RETURN key. [q] q

The tape device is DDS4 (20Gb) and there is only 3Gb of data on the machine so there should be plenty of room on a single tape.

I've tried a different tape drive with the same issue so I don't think it's a hardware problem.

Any help would be appreciated.

bassplayer69 09-08-2008 09:59 AM

This might help you:

http://www.mkssoftware.com/docs/man1/cpio.1.asp


"NOTES

When using its default binary method of storage, cpio cannot save files larger than two gigabytes in size in an archive. When storing archives in ASCII (because of -c), cpio cannot save files larger than eight gigabytes in size in an archive. However, other programs that extract files from cpio archives may be unable to properly extract files larger than two gigabytes and cpio issues a warning to that effect when you attempt to save such a file. "


You might want to try to compress the data first:


Code:

# find / | cpio -ocvB | gzip >/dev/rct0
I use the above code all the time to back up my system, but I write it to a file and then burn the file to a CD/DVD:

Code:

# find /usr | cpio -ocv | gzip >usr.cgz

Or just you could re-direct standard out to the device:

Code:

# find / -depth -print | cpio -ocvB >/dev/rct0
Are you really gaining anything with changing the buffer size (-B) from 512???

rma1 09-10-2008 08:06 PM

Thanks for your reply,

The problem isn't with the cpio command though, It works fine if I direct it to a file. The problem lies with the set-up of the tape dive I think. If you run 'tape amount' after a backup there has always been only 256K written to the tape. I guess something must have been incorrectly set when the tape driver was configured

mkaustin 10-30-2008 11:19 AM

Quote:

using the following command:

find / -depth -print | cpio -ocvB -O /dev/rct0

some files are backed up then the following error is reported:
We've been using DDS2/3/4 tape drives for quite a while. SCO 3.2v5.0.7 works fine w/ cpio.
We typically use the command:
find . -depth -print | cpio -ovcO /dev/rStp0 -C 10240 -K 10000000

The actual device name should be rStp0 instead of rct0. The rct0 is a legacy name.
The -C is the record size (in bytes) to write to the tape.
The -K is the volume size in 1K blocks. 10 million will = 10 Gb on the tape.
On some systems we have had to use the command "tape -a 0 setblk". This is usually only on reading the tapes so this it will seek the record size when it start to read.


All times are GMT -5. The time now is 04:57 AM.