LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   tar multi-volume not working through rsh (https://www.linuxquestions.org/questions/programming-9/tar-multi-volume-not-working-through-rsh-4175445071/)

eamesj 01-10-2013 09:30 PM

tar multi-volume not working through rsh
 
Hi all,

posted this in hardware by mistake.

I'm trying to tar a set of folders onto a tape device mounted on a remote server using:

Code:

tar Mcvf - /route/to/dirs --exclude folders | rsh tapeserver dd of=/dev/device
however once the tape is full the multivolume flag (M) seems to fail and is not asking for another tape

Code:

dd: writing to `/dev/st1': No space left on device
981210355+6 records in
490605178+0 records out
502379702272 bytes (502 GB) copied, 50759.3 seconds, 9.9 MB/s
Rewinding tape...

Can someone possibly let me know why, and how it can be solved.

Also, is there any way to perform tests on the multivolume command without having to wait 12hrs for the tape to finish just to find that it hasnt worked :)

Thanks,

pan64 01-11-2013 05:03 AM

M means multi valume archive. It means tar will create not only one file, but several files. It looks (for me) logically impossible to send all those file to an rsh process using a pipe (you can say using stdout and M are conflicting). Also the dd command will have no idea about the splitting (made by tar).

So you can try tar Mcvf <targetfiles> /route/to/dirs --exclude folders to create splitted archive and send them one by one to the tape device by cat <file> | rsh tapeserver dd of=/dev/device

eamesj 01-12-2013 12:43 AM

Thanks pan64

FYI.
had to remove the pipe entirely

Code:

tar -Mcvf tapeserver:dev/device /route/to/dirs --exclude=/folders

pan64 01-12-2013 04:10 AM

yes, it looks like you can use tar cf hostname:device to write onto a remote device. I didn't know it either. Great!


All times are GMT -5. The time now is 12:03 PM.