Skip to content

Instantly share code, notes, and snippets.

@chrisroos
chrisroos / gpg-import-and-export-instructions.md
Created September 9, 2011 10:49
Instructions for exporting/importing (backup/restore) GPG keys

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...

@jc00ke
jc00ke / gist:372111
Created April 20, 2010 06:05 — forked from ELLIOTTCABLE/gist:372110
ext4 tweaks
parted /dev/sda
> mklabel msdos
> mkpart primary ext2 0% 128MB
> mkpart primary linux-swap 128MB 2176MB
> mkpart primary ext2 2176MB 2688MB
> mkpart primary ext3 2688MB 100%
> set 1 boot on
mkfs.ext4 -b 4096 -E "lazy_itable_init=1" -G 128 -i 4096 -I 256 »
-L "Puzzles' Journal" -m "0.5" -M "/" »