LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-10-2013, 10:30 PM   #1
eamesj
Member
 
Registered: May 2006
Posts: 51

Rep: Reputation: 1
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,
 
Old 01-11-2013, 06:03 AM   #2
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,026

Rep: Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324Reputation: 1324
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
 
Old 01-12-2013, 01:43 AM   #3
eamesj
Member
 
Registered: May 2006
Posts: 51

Original Poster
Rep: Reputation: 1
Thanks pan64

FYI.
had to remove the pipe entirely

Code:
tar -Mcvf tapeserver:dev/device /route/to/dirs --exclude=/folders
 
1 members found this post helpful.
Old 01-12-2013, 05:10 AM   #4
pan64
Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 5,026

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] tar multi-volume not working through rsh eamesj Linux - Hardware 2 01-10-2013 10:34 PM
Creating Multi volume tar files... Alexvader Linux - General 1 05-30-2010 12:53 AM
tar multi-volume (-M): how to specify size? jhwilliams Linux - Software 1 08-16-2007 08:39 PM
multi-volume tar exodist Linux - Software 11 01-18-2005 04:32 AM
Multi-Volume tar(1) archive on CDR ViragoRider Linux - Software 0 05-14-2004 02:45 PM


All times are GMT -5. The time now is 10:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration