Skip to content

Instantly share code, notes, and snippets.

@ps1dr3x
Created October 13, 2023 08:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ps1dr3x/681887b2f6c64710c787bb5fac09e2cb to your computer and use it in GitHub Desktop.
Save ps1dr3x/681887b2f6c64710c787bb5fac09e2cb to your computer and use it in GitHub Desktop.
GPG full backup and re-import
#!/bin/bash
gpg --import private-keys-backup.asc
gpg --import public-keys-backup.asc
gpg --import-ownertrust ownertrust-backup.txt
#!/bin/bash
gpg --export-secret-keys > private-keys-backup.asc
gpg --export > public-keys-backup.asc
gpg --export-ownertrust > ownertrust-backup.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment