LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-13-2009, 05:08 AM   #1
DEF.
Member
 
Registered: Apr 2009
Posts: 96

Rep: Reputation: 23
tar


hmm perhaps this is not the most appropriate thread?

Anyhow, I have created a spanned archive using tar --tape-length

Any ideas how to reconstruct the original from the spanned archives?
 
Old 08-13-2009, 06:24 AM   #2
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
--tape-length changes tapes after writing N*1024 bytes, so in the end it's basically a single tar file split onto several tapes. Copying all tapes to a large HDD and using cat is on way to join them, though I assume that tar will be able to read it's own tapes when the extract option is passed.
--multi-volume informs `tar' that it should create or otherwise operate on a multi-volume `tar' archive, being irrelevant if the volume is a tape or another device. In this case each volume is an independent tar file that can be used on it's own.
See 'info tar' for full documentation.

Linux

Last edited by jeromeNP7; 09-04-2009 at 09:33 PM.
 
Old 08-13-2009, 01:24 PM   #3
DEF.
Member
 
Registered: Apr 2009
Posts: 96

Original Poster
Rep: Reputation: 23
Are you suggesting for example that for a spanned set of 1.tar 2.tar 3.tar I should use the following:

tar -xM 1.tar 2.tar 3.tar

As I found that tar did nothing?
 
Old 08-13-2009, 01:27 PM   #4
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
I believe M only works if you used --multi-volume. Did you try his cat technique?
 
Old 08-13-2009, 06:03 PM   #5
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
In addition to cat, you will probably need -i because of the possible padding at the ends of the tape:
Code:
dd if=/dev/tape bs=1024 count=N > tape1.tar #(etc.)
...
cat tape1.tar tape2.tar ... | tar -xvi
Kevin Barry
 
Old 08-14-2009, 03:12 AM   #6
DEF.
Member
 
Registered: Apr 2009
Posts: 96

Original Poster
Rep: Reputation: 23
Hi, OK cat did not work. I mean I did the following cat 1.tar 2.tar 3.tar > new.tar and the new.tar was created but the file new.tar failed to be extracted with a tar command following the cat. I noticed that new.tar was bigger than the original?

So I wonder if the tar command I used to archive the spanned set was at fault? *Sigh*

I will try tar with i.

Last edited by DEF.; 08-14-2009 at 03:14 AM.
 
  


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
tar | ssh (tar > .tar) syntax issues EarlMosier Linux - Software 6 12-21-2006 12:28 AM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM

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

All times are GMT -5. The time now is 06:22 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