Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 08-13-2008, 05:42 PM   #1
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
sudo tar -cvjf disk-1/backup.tar.bz2 -C rootfs .
or even
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
tar -xvjf backup.tar.bz2
tar -xvjif backup.tar.bz2
I will randomly get this error.
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
LQ Guru
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Linux Mint 17, Debian 8
Posts: 7,863

Rep: Reputation: 311Reputation: 311Reputation: 311Reputation: 311
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


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 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 > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration