How to backup GPG

backupdisaster-recoverygpg

What are the critical files I need to backup from GPG? I guess my private key would qualify of course, but what else?

Best Answer

The most critical are your secret/private keys:

gpg --export-secret-keys > secret-backup.gpg

secret-backup.gpg is then the file to keep safe.

Otherwise the ~/.gnupg/ directory contain all private and public keys(secring.gpg and pubring.gpg respectively) as well as configuration and trustdb which could be convenient to have stored.