Skip to content

Instantly share code, notes, and snippets.

View securitybreach's full-sized avatar

securitybreach securitybreach

View GitHub Profile

Keybase proof

I hereby claim:

  • I am securitybreach on github.
  • I am shofti31 (https://keybase.io/shofti31) on keybase.
  • I have a public key whose fingerprint is 0E5D EC38 014E 4AA7 39F9 596D C942 9AB0 3825 D9F6

To claim this, I am signing this object:

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...