[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tar query



Charlie Brune wrote:
> I generally use something like this:
>    tar  czvpf  my.tar.gz  mydirectory/
> I don't use the "z" option (compress) if the files are binaries 
> (.jpg's, .exe's, etc.) because it goes slower with not much benefit.

I like to use lzop (LZO) which automatically tests the first few sectors 
to see how much of a compression ratio it is getting and merely stores 
it whole if it is below a certain threshhold.
And unlike gzip (LZ77), which is 3-8x slowr, or bzip (BWT), which is 
5-15x slower, lzop compresses is real-time on any modern i686 processor 
of a few hundred MHz or faster.
I.e., your bottleneck is I/O, not CPU.

Of course, loathe the idea of a ustar (cpio, pax, tar) formatted file 
compressed as it destroys the recoverability of the ustar format.
As such, I like to use afio, which is cpio but does per-file compression 
inside of the archive.
As such, errors at one point of the archive as localized to those files 
compressed individually inside of the archive.
This is unlike normal ustar which defines no compression standard, and 
most utilities just compress the whole archive.
Thus an error at one point of the archive can render the rest of the 
archive unusable.

The absolutely most moronic backup strategy I've ever seen was someone 
who tar/gzipped one big file, then split them into CD size parts and 
then made an ISO image of each and burnt then individually.
If a single CD has a single byte error, there is a good chance that all 
the data after that on not only that CD is toast, but all those CDs hat 
follow.
Afio can build completely independent volumes of a specified size, so 
they can be burnt as standalone CD/DVDs.

If you know that your backup will fit on 1 CD or DVD, then my script 
published in 2002 April Sys Admin is most ideal.
It doesn't "double archive" (remember, mkisofs is an "archive" step on 
its own, which cdrecord being the "unarchive" step) at all.
You get a full, directly browseable CD/DVD tree with per-file 
compression.
It supports bzip2, gzip and lzop (default) compression programs.

--
Bryan J. Smith   mailto:b.j.smith@ieee.org
Currently Mobile

-
To unsubscribe, send email to majordomo@silug.org with
"unsubscribe silug-discuss" in the body.