PDA

View Full Version : Amanda and tar/gtar


virgilg
December 8th, 2006, 07:53 PM
Hi,

We have the amanda server running on Debian with several heterogenous clients. Every now and then we have trouble restoring data from the tapes. gzip / tar gives up with
- tar: Archive contains obsolescent base-64 headers <- when trying to restore on an OpenBSD machine with the same model tape drive
- gzip: crc error (on a Debian machine)

I have tried:
amrestore -p /dev/nrst0 machine directory | restore -ivf -
which fails with "not a dump tape" (with or without -b 2, on OpenBSD)

amrestore -c /dev/nrst0 machine._directory.date.level ;
mv machine._directory.date.level machine_directory.tar.gz ;
gzip -d machine_directory.tar.gz ; tar xvf machine_directory.tar ./needed_files
this fails with either obsolescent base-64 headers, or with tar skipping to next header, depending on the OS I am running it under (Debian or OpenBSD 3.9)

amrestore /dev/nrst0 machine._directory.date.level
fails with broken pipe after churning through part of the file.

Does anyone have any ideas? Any similar errors or situations out there?

Best,
Virgil

paddy
December 10th, 2006, 05:27 PM
What version of amanda are using?

Did you use the same version of gtar, gzip to backup the files that you
are not able to restore?

From your restore example commands, it appears you are doing
backups using dump as well gnu tar. Is my understanding correct?

Do you have problems with restoration of some specific clients or the restoration
problems random?

Thanks,
Paddy

virgilg
December 11th, 2006, 09:45 AM
Hi, paddy

>What version of amanda are using?
amanda 2.4.2

>Did you use the same version of gtar, gzip to backup the files that you
are not able to restore?
Not really. The tape server runs (gnu)tar 1.12, clients back up using (gnu)tar 1.14. However we tried (gnu)tar 1.15 on OpenBSD on one of our tapes and it still fails.

>From your restore example commands, it appears you are doing
backups using dump as well gnu tar. Is my understanding correct?
No. That was just an example; tried to see if using dump and restore works. It does.

>Do you have problems with restoration of some specific clients or the restoration problems random?
They appear to be random clients. Sometimes we have to get around that utilities on the tape server (including tar) were not built with large file support. OpenBSD's and clients' ones do not have this problem. However, we did note that it's mostly big files (>2GB) that we cannot restore from.

I am especially concerned with the amrestore failing when _not_ specifying the -c option. Interestingly, it does not fail when passing -c, but then gzip / tar -z does, so I don't know what to blame.

More info:
The OpenBSD machines use (gnu)tar v1.15.1p5; the whole reason for the OpenBSD examples is that we're building a new tapeserver which will run OpenBSD 3.9 with amanda 2.4.5.1. We hope that one of its side effects will be that this tape restore problem will go away.

Best,
Virgil

paddy
December 11th, 2006, 02:01 PM
It is difficult to predict compatibility between tar versions. It will be a good idea to use
the same tar versions on the server and the client.

Paddy

virgilg
December 11th, 2006, 03:52 PM
Hi, paddy

One of my co-workers figured out a way to get it, on OpenBSD, using its tar, not gtar. This means that when running the example below, it fails with gtar and succeeds with tar.

amrestore -c -p /dev/nrst0 machine /path/to/file | split -b512m

Then concatenate the resulting files, pipe to zcat,
(cd .. && cat x*)|zcat|tar -s '/^[0-9]*\///' -xpf -

I hope this is gonna work for us for now. Weird, though, the differences between tar and gtar, considering the archive was made with gtar in the first place.

Best,
Virgil