21 Jul 2008, 09:03

OpenPGP/GnuPG Key Backup

Share

Thought about Backup recently? What about Key-Backup?

If you happen to use OpenPGP to encrypt your files, you’ll probably want to do a key backup so you can decrypt them later if your OpenPGP installation should get lost. You’ll only need a few simple commands.

gpg -ao mypublic.key –export <keyid>
gpg -ao myprivate.key –export-secret-key <keyid>
This will export (-o) the public (–export) and private keys (–export-secret-key) of the keypair with the id <keyid> to two seperate files in ASCII (Base64) encoding (-a). How you find out the keyid? Use the parameter –list-keys.