32 lines
1.3 KiB
Bash
Executable File
32 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# klevstul :: 24.06
|
|
|
|
# ---------------------------------------------------------------------------------------------------------------------
|
|
# how to backup gpg:
|
|
#
|
|
# new method:
|
|
# cp /home/poq/.gnupg/
|
|
# gpg --armor --export frode@klevstul.com > /home/poq/.local/share/Cryptomator/mnt/cryptLocal/content/keys/openPgp/.gnupg/251110_frodeKlevstul_publicKey.asc
|
|
# gpg --armor --export-secret-keys frode@klevstul.com > /home/poq/.local/share/Cryptomator/mnt/cryptLocal/content/keys/openPgp/.gnupg/251110_frodeKlevstul_privateKey.asc
|
|
#
|
|
# old method:
|
|
# gpg --export --export-options backup --output public.gpg frode@thisworld.is
|
|
# gpg --export-secret-keys --export-options backup --output private.gpg frode@thisworld.is
|
|
# ref: https://www.howtogeek.com/816878/how-to-back-up-and-restore-gpg-keys-on-linux/
|
|
# ---------------------------------------------------------------------------------------------------------------------
|
|
|
|
this_file_name=`basename "$0"`
|
|
echo "$this_file_name"
|
|
|
|
echo "please, remember the hint: poq.l2"
|
|
|
|
# location of ssh keys
|
|
syncdir_env_var=SYNCDIR_${HOSTNAME}
|
|
src_gnupg_dir=${!syncdir_env_var}/secrets/gnupg
|
|
|
|
gpg --import ${src_gnupg_dir}/*publicKey.asc
|
|
gpg --import ${src_gnupg_dir}/*privateKey.asc
|
|
|
|
gpg --list-secret-keys --keyid-format LONG
|