Backup Strategy Not Working
William Scott Lockwood III
scott at guppylog.com
Fri Jul 31 18:47:13 UTC 2015
On Fri, Jul 31, 2015 at 1:37 PM, Graham Watkins
<shellycat.gw at ntlworld.com> wrote:
> tar -cvpzf /media/graham/Expansion\ Drive/graham.tar.gz /home/graham
> --exclude "/home/graham/VirtualBox VMs"
>
> Anyway recently I had reason to access the tar.gz file created by this
> command and using Archive Manager, I attempted to open the tar.gz file.
> It would not open and I received the following error message:
>
> gzip: stdin: invalid compressed data--format violated
> tar: Unexpected EOF in archive
> tar: Error is not recoverable: exiting now
I'm betting the archive is corrupted. This is a known potential
problem. This may help. Remember, a backup is only as good as your
test of your ability to extract useful information from it. In your
case, I think you'd be better off using -a.
From: http://www.gnu.org/software/tar/manual/tar.html#SEC134
`-Z'`--compress'`--uncompress'
Filter the archive through compress.
When any of these options is given, GNU tar searches the compressor
binary in the current path and invokes it. The name of the compressor
program is specified at compilation time using a corresponding
`--with-compname' option to configure, e.g. `--with-bzip2' to select a
specific bzip2 binary. See section Using lbzip2 with GNU tar., for a
detailed discussion.
The output produced by tar --help shows the actual compressor names
along with each of these options.
You can use any of these options on physical devices (tape drives,
etc.) and remote files as well as on normal files; data to or from
such devices or remote files is reblocked by another copy of the tar
program to enforce the specified (or default) record size. The default
compression parameters are used. Most compression programs let you
override these by setting a program-specific environment variable. For
example, with gzip you can set GZIP:
$ GZIP='-9 -n' tar czf archive.tar.gz subdir
Another way would be to use the `-I' option instead (see below), e.g.:
$ tar -cf archive.tar.gz -I 'gzip -9 -n' subdir
Finally, the third, traditional, way to do this is to use a pipe:
$ tar cf - subdir | gzip -9 -n > archive.tar.gz
Compressed archives are easily corrupted, because compressed files
have little redundancy. The adaptive nature of the compression scheme
means that the compression tables are implicitly spread all over the
archive. If you lose a few blocks, the dynamic construction of the
compression tables becomes unsynchronized, and there is little chance
that you could recover later in the archive.
Other compression options provide better control over creating
compressed archives. These are:
`--auto-compress'`-a'
Select a compression program to use by the archive file name suffix.
The following suffixes are recognized:
Suffix
Compression program
`.gz'
gzip
`.tgz'
gzip
`.taz'
gzip
`.Z'
compress
`.taZ'
compress
`.bz2'
bzip2
`.tz2'
bzip2
`.tbz2'
bzip2
`.tbz'
bzip2
`.lz'
lzip
`.lzma'
lzma
`.tlz'
lzma
`.lzo'
lzop
`.xz'
xz
--
W. Scott Lockwood III
More information about the ubuntu-users
mailing list