LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2004, 05:57 AM   #1
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Rep: Reputation: 31
backing up help with tar


Hi
Im trying to backup my home directory using tar and end up with a files thats about 10gig!

The problem I am having is now what to do with such a large file.
Is there a way to split the file up to a reasonable size to burn to dvd or another partition?

Or is there a way that tar will create multiple files a set size e.g. 5 x 2gig files?

Thanks Danny
 
Old 08-20-2004, 06:05 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Tar, by itself, does not compress the files it 'only' puts al the files in an archive.

You could use the z option that is part of tar to also compress the archive.

$ tar zcf <nametar.tgz> <target(s)>

It is possible that the z flag is not supported/compiled in. In this case use bzip2 (or simular) to compress your archive.

If the created file is still to big, you could use split to create multiple parts.

Hope this gets you going again.
 
Old 08-20-2004, 09:01 PM   #3
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Thanks for the reply

I Have tried to get split working but am having alot of errors.

In testing I created an archive using tar -czvf with know problem.
When I try to split the archive using

split -b 50m <filename> <dest filename>

It goes through most of the motions then I get an error at the end

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now


I tried creating the archive through bzip and got a different error:

bzip2: Compressed file ends unexpectedly;
perhaps it is corrupted? *Possible* reason follows.
bzip2: Inappropriate ioctl for device
Input file = (stdin), output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.



The Dist I am using is Fedora Core 1 with standard kernel
P III 800mhz
300M of ram
40gig harddisk

Any other suggestions on this problem would be great!!

Thanks Danny
 
Old 08-21-2004, 06:52 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Too bad you did not posted the commands you used, it should work.

Create the archive:
$ tar zcf druuna.tgz *

Split the created archive:
$ split -b 50000 druuna.tgz druuna.tgz.

Depending on the size of druuna.tgz, you wil end up with several druuna.tgz.aa, druuna.tgz.ab etc etc. Each 50000 bytes long (-b 50000). man split for details. The original will not be deleted.

To put them back together:

$ cat druuna.tgz.* > druuna.tgz

Hope this clears things up a bit.
 
Old 08-22-2004, 05:35 AM   #5
dannyk1
Member
 
Registered: Aug 2004
Location: Geelong, Vic Australia
Distribution: Gentoo, Ubuntu,and sometimes something from billy gates (when Im desperate)
Posts: 188

Original Poster
Rep: Reputation: 31
Thanks Problem solved!!!


The problem was split was working properly but the way I was trying to extract at the end was wrong

I was trying to un tar the file <Filename.tgz.aa> Instead of using cat (which is not mentioned in the man page)!


Thanks

Danny
 
Old 08-22-2004, 06:25 AM   #6
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
you'll also want ot see here
 
  


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
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 10:55 AM
Backing up with tar rooch84 Linux - Software 2 08-20-2004 02:30 AM
Exclude directories when backing up with 'tar'? wolfpeach Linux - Newbie 2 06-28-2004 10:54 AM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 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
Open Source Consulting | Domain Registration