LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 09:30 PM   #1
eamesj
Member
 
Registered: May 2006
Posts: 54

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, 05:03 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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, 12:43 AM   #3
eamesj
Member
 
Registered: May 2006
Posts: 54

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, 04:10 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
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



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 09:34 PM
Creating Multi volume tar files... Alexvader Linux - General 1 05-29-2010 11:53 PM
tar multi-volume (-M): how to specify size? jhwilliams Linux - Software 1 08-16-2007 07:39 PM
multi-volume tar exodist Linux - Software 11 01-18-2005 03:32 AM
Multi-Volume tar(1) archive on CDR ViragoRider Linux - Software 0 05-14-2004 01:45 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:07 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration