gpg primer
miblogic@gmail.com procedure:
gpg --gen-key
gpg --list-keys
// export public key, --armor makes the key file ascii readable
gpg --armor --export miblogic@gmail.com > miblogic.gmail.public.key
// just the same
gpg -a --export miblogic@gmail.com > miblogic.gmail.public.key
// export private key
gpg --armor --export-secret-key miblogic@gmail.com > miblogic.gmail.private.key
// import the public key of miblogic@yahoo.com
gpg --import miblogic.yahoo.public.key
// gpg a piped output:
pg_dump -i -h 127.0.0.1 -p 5432 -U postgres -F c -v Cashflow | gpg --recipient miblogic@yahoo.com --encrypt --output Cashflow.backup.gpg
// gpg a file:
gpg --recipient miblogic@yahoo.com ---output file.txt.encrypted --encrypt file.txt
// miblogic@yahoo.com decrypting a message from miblogic@gmail.com
gpg --recipient miblogic@yahoo.com --output the_file.txt --decrypt file.txt.encrypted
Labels: gpg pg_dump postgres backup