LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-13-2008, 05:42 PM   #1
ShadowHywind
Member
 
Registered: Oct 2005
Distribution: Kubuntu
Posts: 38

Rep: Reputation: 15
tar & un tar Data integrity error


Hi all, having a bit of a problem. I am trying to make a backup of my linux partition, using the command
Code:
sudo tar -cvjf disk-1/backup.tar.bz2 -C rootfs .
or even
Code:
sudo tar -cvjif disk-1/backup.tar.bz2 -C rootfs .
which runs exactly what I want, and leaves me a 6 gb tar.bz2 file. However the issue i get is when i un tar the file using
Code:
tar -xvjf backup.tar.bz2
or
Code:
tar -xvjif backup.tar.bz2
I will randomly get this error.
Code:
bzip2: Data integrity error when decompressing.
        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.

tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
The Data integrity error doesn't always seam to happen at the same file. I am thinking that perhaps this is due to the 6 gb size file. If it helps any, I am saving and extracting the tar.bz2 on a ext3 external harddrive. Any ideas would be great. Thanks
 
Old 08-13-2008, 08:29 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
If you have the room on your backup partition I suggest that you use cp instead of tar and not compress your backup. If you use the -a option of cp then all backups except the first will run much faster than tar backups.

Also partial restores will be easier because the backup tree will mirror your / tree and you can browse and selectively restore a few files or a few directories fairly easily.

If you have to compress because of space limitations then I suggest that you break the backup into individual directories. Back up /bin, /boot, /dev, and so on as separate tar backups. This method also makes partial restores easier but not as easy as the cp method.

--------------------
Steve Stites
 
  


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 On
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
creating tar files with high data integrity edman007 Linux - Software 13 10-10-2006 02:00 PM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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