Am 18.05.2011 12:56, schrieb Jean-Louis Martineau:
> You said the backup is crypted with amcrypt? You should try to decrypt
> it with amcrypt -d
"bb" was the decrypted file already.
I followed your suggestion:
$ amcrypt -d < aa > bb
> I don't know what 'file' report for a file encrypted with amcrypt. It
> can be 'data'.
Very likely, yes.
> It is hard to follow you. Which argument to amrestore.
$ amrestore -r /dev/nst0 juno root_enc
> Can you print all command and argument, and their stdout/stderr. I need
> to follow you step by step.
sure
> Post a cut&paste of the complete session.
$ amrestore /dev/nst0 juno root_enc
fails with ERROR: /usr/bin/gzip exited with status 1
> Also, I want to see the amanda header.
> Are you sure you have the correct passphrase for amcrypt
Yes, as it has not changed inbetween.
> Do amrestore (without -r) correctly restore the tar file?
No, see above.
With "-r" I get:
$ file juno.root_enc.20110517220001.1.0000001.RAW
juno.root_enc.20110517220001.1.0000001.RAW: AMANDA
$ dd if=juno.root_enc.20110517220001.1.0000001.RAW bs=32k count=1
AMANDA: SPLIT_FILE 20110517220001 juno root_enc part 1/-1 lev 1 comp
.gz program /usr/local/bin/amgtar crypt enc server_encrypt
/usr/local/sbin/amcrypt server_decrypt_option -d
ORIGSIZE=224560
DLE=<<ENDDLE
<dle>
<program>GNUTAR</program>
<disk>root_enc</disk>
<diskdevice>/</diskdevice>
<level>1</level>
<auth>BSD</auth>
<compress>FAST</compress>
<encrypt>SERVER-CUSTOM<custom-encrypt-program>/usr/local/sbin/amcrypt</custom-encrypt-program>
<decrypt-option>-d</decrypt-option>
</encrypt>
<record>YES</record>
<index>YES</index>
<datapath>AMANDA</datapath>
<exclude>
<file>./mnt</file>
<file>./tmp</file>
<file>./var/run</file>
</exclude>
</dle>
ENDDLE
To restore, position tape at start of file and run:
dd if=<tape> bs=32k skip=1 | /usr/local/sbin/amcrypt -d | /usr/bin/gzip
-dc | /usr/local/bin/amgtar -xpGf - ...
1+0 records in
1+0 records out
32768 bytes (33 kB) copied, 0,000826 seconds, 39,7 MB/s
$ dd if=juno.root_enc.20110517220001.1.0000001.RAW bs=32k skip=1 of=aa
1462+0 records in
1462+0 records out
47906816 bytes (48 MB) copied, 0,127757 seconds, 375 MB/s
$ file aa
aa: data
$ amcrypt -d < aa > bb
$ file bb
bb: data
$ cat bb | gzip
$ gzip -d bb
gzip: bb: unknown suffix -- ignored
amanda@juno:/mnt/amhold/restoretest> cat bb | gzip -dc
gzip: stdin: not in gzip format
$ tar -tvf bb
tar: Das sieht nicht wie ein „tar“-Archiv aus.
tar: Springe zum nächsten Kopfteil.
tar: Archiv enthält veraltete Base64-Kopfteile
.....
> Do amfetchdump restore the tar file?
amfetchdump -d /dev/nst0 abt juno root_enc
amfetchdump: '[sec 1051.000000 bytes 33089136686 kps 30745.585157
orig-kb 32313610]' at
/usr/lib/perl5/site_perl/5.8.8/Amanda/DB/Catalog.pm line 677.
error ....