AMGPGCRYPT(8)
π AMGPGCRYPT β section 8 of the manual, bestie (System Administration Commands)
okay so real talk, this page is about amgpgcrypt, and it's truly the reference crypt program for Amanda public-key data encryption. she's iconic, she's niche, she's got main character energy in a very specific way β¨
πΈ NAME
amgpgcrypt β the reference crypt program for Amanda public-key data encryption. no cap, that's literally her whole job π
π¦ SYNOPSIS
amgpgcrypt to be called by Amanda only
like, she's not for you to call directly, she's booked and busy with Amanda only π
β¨ DESCRIPTION
amgpgcrypt calls gpg to perform public-key data encryption on Amanda backup. that's the vibe check she passes every time π«Ά
she goes looking for the gpg program in these directories, in this exact order:
/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin
then amgpgcrypt sets GNUPGHOME to $AMANDA_HOME/.gnupg, which is where gpg will look for the gpg keys. she uses the public key to encrypt the Amanda data, and uses the private key to decrypt the Amanda backup data. the way that works out is: you only need the passphrase at the time of data restore πβ¨
π KEY AND PASSPHRASE
amgpgcrypt uses the private key to decrypt Amanda backup data.
and this next part is highkey the most important thing on the whole page, so listen up: it is very important to store, manage and protect the key and the passphrase properly. Encrypted backup data can only be recovered with the correct key and passphrase. that's it, that's the deal π
π§ HOW TO CREATE ENCRYPTION KEYS AND PASSPHRASE FOR AMGPGCRYPT
first step: store the passphrase that you used in the following gpg --gen-key command inside the home-directory of the AMANDA-user ($amanda_user) and protect it with proper permissions:
echo my_secret_passphrase > ~$amanda_user/.am_passphrase
chown $amanda_user:disk ~$amanda_user/.am_passphrase
chmod 700 ~$amanda_user/.am_passphrase
then run gpg --gen-key. below is an example, preserved in all her glory π
$ gpg --gen-key
gpg (GnuPG) 1.2.6; Copyright (C) 2004 Free Software Foundation, Inc.
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions. See the file COPYING for details.
Please select what kind of key you want:
(1) DSA and ElGamal (default)
(2) DSA (sign only)
(4) RSA (sign only)
Your selection? 1
DSA keypair will have 1024 bits.
About to generate a new ELG-E keypair.
minimum keysize is 768 bits
default keysize is 1024 bits
highest suggested keysize is 2048 bits
What keysize do you want? (1024)
Requested keysize is 1024 bits
Please specify how long the key should be valid.
0 = key does not expire
(n) = key expires in n days
(n)w = key expires in n weeks
(n)m = key expires in n months
(n)y = key expires in n years
Key is valid for? (0) 6m
Key expires at Sun 06 Aug 2006 03:51:25 PM PDT
Is this correct (y/n)? y
You need a User-ID to identify your key; the software constructs the user id
from Real Name, Comment and Email Address in this form:
"Heinrich Heine (Der Dichter) (heinrichh@duesseldorf.de)"
Real name: amandabackup
Email address:
Comment: gpg keys for amandabackup
You selected this USER-ID:
"amandabackup (gpg keys for amandabackup)"
Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? o
You need a Passphrase to protect your secret key.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
public and secret key created and signed.
key marked as ultimately trusted.
pub 1024D/4417A8CB 2006-02-07 amandabackup (gpg keys for amandabackup)
Key fingerprint = 139C 6369 44FC 7F1A 655C E5E9 7EAA 515A 4417 A8CB
sub 1024g/8C3A6A78 2006-02-07 [expires: 2006-08-06]
π FILES
$AMANDA_HOME/.gnupg/pubring.gpgβ the public key.amgpgcryptencrypts data with this public key along with the cipher algorithm. she's the one doing the encrypting, no notes π$AMANDA_HOME/.gnupg/secring.gpgβ the private/secret key. it's only needed duringamrecover/amrestore. store and protect it properly during other time. like, genuinely, protect her π$AMANDA_HOME/.am_passphraseβ the passphrase. it's only needed duringamrecover/amrestore. store and protect it properly during other time. same energy, same rules π
π BUGS
okay so this is the one annoying thing: Amanda has a problem with gpg mdc (modification detection code) in the binary mode. so amgpgcrypt calls gpg with mdc disabled. not ideal, but that's the situation, and now you know π
π SEE ALSO
amanda(8), amanda.conf(5), amcrypt(8), amrestore(8), gpg(1)
The Amanda Wiki: : http://wiki.zmanda.com/ π¦
π AUTHOR
Kevin Till <kevin.till@zmanda.com> Zmanda, Inc. (http://www.zmanda.com)
and that's the whole page, bestie, you ate that π this beauty is Amanda 3.5.4, dated 07/23/2025 β go forth and encrypt responsibly, fr fr πβ¨
π¦ where this page comes from
- fedora 43: amanda 3.5.4-17.fc43 Β· BSD-3-Clause AND GPL-3.0-or-later AND GPL-2.0-or-later AND GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms