[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] wishlist: transparent compression on file- and not archive
From: |
Christian Hammers |
Subject: |
Re: [Bug-tar] wishlist: transparent compression on file- and not archive level |
Date: |
Thu, 20 Jul 2006 23:37:13 +0200 |
Hello
On 2006-07-19 Doug McLaren wrote:
> On Wed, Jul 12, 2006 at 10:57:58AM +0200, Christian Hammers wrote:
>
> | For backups, many people decide against the usual compressing method
> | via "-j"/"-c" as one single tape/disk medium error makes the complete
> | tar archive unusable.
>
> Actually, there's a trivial way around this, and then one that's a bit
> more work.
>
> Trivial: simply use bzip2 rather than gzip. bzip2 compresses data in
> block (usually 900 KB in size), and each block is handled
> independantly. If one block is corrupted, the next block will be
> unaffected, and decompression can restart there.
This would be enough, theoretically. In practice though, the experiment
failed:
- tar czf test.tar.bz2 /home/ch/doc/pics/ # 1200 files with 160MB
- hexedit test.tar.bz2 # insert 8 zeroes at about 15%
- bzip2recover test.tar.bz2 # 192 rec00XXX.tar.bz files created
- bunzip2 rec*.bz2
- mv rec00019.tar.bz bad00019.tar.bz
- bunzip2 rec*.bz2 # uncompress the remaining
- cat rec*.tar > recovered.tar
- tar xvvf recovered.tar
...
-rw-r--r-- root/ch 1007332 2006-05-29 20:54 \
home/ch/doc/pics/Freunde/Anna (Lousberg) 2.jpg
tar: Skipping to next header
tar: Error exit delayed from previous errors
Although only 35 files in 17MB were restored, tar aborts.
As told with "string |grep -c home/ch/doc" there should be
1103 files in 166MB in recovered.tar.
So what am I doing wrong here?
> | To circumvent this drawback tar could use libz to zip the individual
> | file chunks inside the tar archive so that in the case of a bit error
> | on the medium only one file gets corrupted - which would be the case
> | in the present implementation anyway.
>
> I suggested something similar about 12 years ago, except that in my
> case I was suggesting that if something was to be compressed, it would
> just be renamed in the archive --
It was at least a clever idea...
bye,
-christian-
Re: [Bug-tar] wishlist: transparent compression on file- and not archive level, Doug McLaren, 2006/07/21
- Re: [Bug-tar] wishlist: transparent compression on file- and not archive level,
Christian Hammers <=