LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 06: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, 07:05 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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, 10: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, 07:52 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
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, 06: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, 07: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


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
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 03:48 AM
tar tar cvf - . | (cd /root/; tar xvf -) ewt3y Linux - General 10 02-19-2014 11:55 AM
Backing up with tar rooch84 Linux - Software 2 08-20-2004 03:30 AM
Exclude directories when backing up with 'tar'? wolfpeach Linux - Newbie 2 06-28-2004 11:54 AM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 07:30 AM


All times are GMT -5. The time now is 08:41 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration