Backup and Restore a GPG Key on Linux
"Back up my GPG key" sounds like one command, but a working restore actually needs four pieces — the public key, the secret key, the ownertrust database, and a revocation certificate. Miss any one and you end up on a new box with keys that exist but don't decrypt, don't sign, or are flagged "unknown trust." This guide walks the full backup-and-restore loop on Linux, with the exact gpg invocations, the right import order, a worked end-to-end example, and the failure modes that surprise people the first time.