I'm reading up on these instructions for backing up gpg keys: https://gist.github.com/chrisroos/1205934

He says that in the gpg instructions it says that it's better to export trustdb and simply backing it up. However these instructions were created five years ago, so I'm wondering whether this is still necessary. Ideally I would just create a tar archive of the .gnupg directory containing:

  • pubring.gpg
  • secring.gpg
  • trustdb.gpg


TIA, Ole


Every time I'm doing or did this (on my personal machines or multiple others) I've just copied .gnupg/ and restored it afterwards. It went well each time so I would recommend to do so.

(Remember to backup gnupg.conf as well if you're using some non-default options, which you should.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.