Use at your own risk! As with any backup method, test out your backup by restoring from it before you trust it.
-
Install
qrcode
to generate the QR code:pip install qrcode
-
Export the key, piping the output to
qr
, and save this to a png file:gpg --export-secret-key -a "User Name" | qr > secret-key-qr.png
-
Print out the png, and stick it somewhere safe.
Note that a 4096-bit key won't fit in a QR code.