LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 01-17-2005, 04:38 PM   #1
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Rep: Reputation: 46
multi-volume tar


How can a generate a tar file that is split into 4.4gb portions that I can burn to dvd's? I have about 80gb of stuff to backup, some files larger than a single dvd can hold.
 
Old 01-17-2005, 06:11 PM   #2
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
You need to use the multi-archive flags, and to give it a tape length which is N*1024 bytes

So to split a large archive you can use: ( note 4505600 is a guess it maybe a little smaller size that you need )

tar -c -M -L=4505600 --file=part1.tar largefile.tar.gz

It will stop after creating the first part and ask you:

Prepare volume #2 for part1.tar and hit return:

What you need to do is enter:
n part2.tar

You will then get the prompt
Prepare volume #2 for part2.tar and hit return:

and you can hit return. You can of couse repeat this for as many parts as you want.

Putting the parts back together is a matter of

tar -x -M --file=part1.tar largefile.tar.gz
Prepare volume #2 for part1.tar and hit return: n part2.tar
Prepare volume #2 for part2.tar and hit return:
 
Old 01-17-2005, 07:35 PM   #3
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 57
Try Mondo Rescue. While it may be a bit of overkill if you're just backing up data it's very conveniant - especially having bootable CD's or DVD's with your system files on it.


Håkan
 
Old 01-17-2005, 07:50 PM   #4
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Original Poster
Rep: Reputation: 46
thank you.

leonscape:
Will it autpomatically change the number? or do I need to type "Part#" each time?
 
Old 01-17-2005, 08:05 PM   #5
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
You have to type the "n partX.tar" for each piece. You could try this script

split-tar instructions are here, but it can't split big files within the tar's.

Last edited by leonscape; 01-17-2005 at 08:07 PM.
 
Old 01-17-2005, 08:11 PM   #6
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Original Poster
Rep: Reputation: 46
all good but 1 prob :-(
the large files I have are not already a tar file. and I only have enogh hd space for the original and the part tars, not enough for original, temporary large tar, and part tars all combined. I need to go directly from the structure to the partial files, no middle-man large tar.
 
Old 01-17-2005, 08:26 PM   #7
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Thats fine just replace largefile.tar.gz with what you want to tar, i.e.

tar -c -M -L=4505600 --file=part1.tar adirectory/ anotherdirectory/

or

tar -c -M -L=4505600 --file=part1.tar filename1 filename2

You can also use the compression stuff like gz or bz2, by using -cz or -cj instead off -c.
 
Old 01-17-2005, 09:01 PM   #8
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Original Poster
Rep: Reputation: 46
I hope it works, what I read in the script made me think it generated the large tar itself that way.
 
Old 01-18-2005, 01:30 AM   #9
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
I'd reccomend going about it this way:
tar the directory, then follow this tutorial to split and reassemble the files.
 
Old 01-18-2005, 01:51 AM   #10
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Original Poster
Rep: Reputation: 46
that is exaclt what I need to do, problem is I do not have enough hd space to do it that way:
root@Abydos exodist # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 27G 3.8G 24G 14% /
/dev/sda1 236M 36M 200M 16% /boot
/dev/sda3 19G 9.1G 9.7G 49% /home
/dev/sda5 27G 33M 27G 1% /lin64
/dev/hde1 115G 29G 86G 26% /stuff
/dev/hdh1 115G 61G 55G 53% /stuff/Video
/dev/hdg1 115G 95G 20G 83% /stuff/Video/Anime1
/dev/hdf1 115G 101G 15G 88% /stuff/Video/Anime2
/dev/hdc1 75G 49G 27G 65% /stuff/Audio

now, I need to do all of /stuff/Audio (it's all legal if anyone asks)
it needs to go to dvd

so I tar it all up, that means it needs to go to a drive large enogh.. this leaves /stuff and /stuff/video w/ enough room

I fill one, then I need to split it, assuming I can split into a different drive than the master tar file I split it onto the other.

now I need to make iso's (btw I want all the stages including iso generating to be part of a perl script I will write)

this is where I had my first problem, wher eis there enough room for them without writing logic to put it where it fits (now that I think fo it thats not hard) but I can remove the master large tar file. and go back to that drive for the iso's.

....hopefully if I need to restore them I will have enough space to restore the .tar AND extract it :-)

thanx for th ehelp everyone, I think I can get something working with this.
 
Old 01-18-2005, 01:56 AM   #11
exodist
Senior Member
 
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,372

Original Poster
Rep: Reputation: 46
just a disclaimer, all my stuff, video, audio, etc. are all legal, the anime's are unliscenced, and inside Video is anime3 taking all the space. as for audio it is mostly obscure j-pop and foreign stuff not liscenced in US. I do not use/traffic in/etc. illegal data
 
Old 01-18-2005, 04:32 AM   #12
leonscape
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313

Rep: Reputation: 47
Create the large archive in /stuff
cd /stuff
tar -cvjf stuffaudio.tar.bz2 audio/

Remove the contents of audio
rm -rF audio/

Then split tar
tar -cM -L 4505600 --file=audio/audio1.tar stuffaudio.tar.bz2

Then the n /audio/audio2.tar stuff, or use the split-tar program.
 
  


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
Multi-Volume Tape Backup Question Jerry_Christ Linux - Software 1 05-27-2011 10:27 AM
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 10 02-23-2008 06:40 AM
How to Boot Multi Windows & Multi Linux olkar Linux - Newbie 5 10-03-2005 12:52 PM
Multi-volume file archives JoshSmith41 Linux - Software 3 07-05-2004 07:42 PM
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 02:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration