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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-17-2005, 03:38 PM
|
#1
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Rep:
|
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.
|
|
|
|
01-17-2005, 05:11 PM
|
#2
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
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:
|
|
|
|
01-17-2005, 06:35 PM
|
#3
|
|
Senior Member
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032
Rep:
|
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
|
|
|
|
01-17-2005, 06:50 PM
|
#4
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Original Poster
Rep:
|
thank you.
leonscape:
Will it autpomatically change the number? or do I need to type "Part#" each time?
|
|
|
|
01-17-2005, 07:05 PM
|
#5
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
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 07:07 PM.
|
|
|
|
01-17-2005, 07:11 PM
|
#6
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Original Poster
Rep:
|
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.
|
|
|
|
01-17-2005, 07:26 PM
|
#7
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
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.
|
|
|
|
01-17-2005, 08:01 PM
|
#8
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Original Poster
Rep:
|
I hope it works, what I read in the script made me think it generated the large tar itself that way.
|
|
|
|
01-18-2005, 12:30 AM
|
#9
|
|
Senior Member
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851
Rep:
|
I'd reccomend going about it this way:
tar the directory, then follow this tutorial to split and reassemble the files.
|
|
|
|
01-18-2005, 12:51 AM
|
#10
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Original Poster
Rep:
|
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.
|
|
|
|
01-18-2005, 12:56 AM
|
#11
|
|
Senior Member
Registered: Aug 2003
Location: Portland, Oregon
Distribution: Gentoo
Posts: 1,368
Original Poster
Rep:
|
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
|
|
|
|
01-18-2005, 03:32 AM
|
#12
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Debian SID / KDE 3.5
Posts: 2,313
Rep:
|
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 01:28 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|