LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2013, 10:13 AM   #1
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 221

Rep: Reputation: Disabled
KGpg-versus terminal : how to backup the keys - with entire "~.gnupg/" directory


hello dear linux-experts,

pretty new to linux - but i want to upgrad from Suselinux 12.3 to 13.1

now i have to backup lots of things.

eg. the keys:

btw. as the KGpg was up and running - i started to export the keys.
*note: *i only can epxort the *_public_keys_* - is this okay!?





there are various ways to export/import (backup/restore) the keys.


one way

we do a backup of all those public and secret keyrings and of course also of the so called trust database

Quote:
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...
gpg --export-ownertrust > chrisroos-ownertrust-gpg.txt

Restore the public and secret keyrings and trust database

Quote:
cp /path/to/backups/*.gpg ~/.gnupg/
# or, if you exported the ownertrust
gpg --import-ownertrust chrisroos-ownertrust-gpg.txt

the next way


This only really works if we are sure that we do not loose any other keys
We can export the whole public and secret key and ownertrust. Many many ppl like this way:


Quote:
gpg -a --export mymail.dot.com > chrisroos-public-gpg.key
gpg -a --export-secret-keys mymail.dot.com > chrisroos-secret-gpg.key
gpg --export-ownertrust > mybloddyname-ownertrust-gpg.txt

Friends told me to forget kgpg and just backup the entire "~.gnupg/" directory.

How To do that!? With terminal!?

Last edited by sayhello_to_the_world; 12-10-2013 at 11:01 AM.
 
Old 12-11-2013, 04:03 AM   #2
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,292

Rep: Reputation: 222Reputation: 222Reputation: 222
Quote:
Friends told me to forget kgpg and just backup the entire "~.gnupg/" directory.

How To do that!? With terminal!?
you can use rsync to copy to another server

check out this link: http://linoxide.com/how-tos/rsync-copy/
 
Old 12-16-2013, 04:07 AM   #3
JJJCR
Senior Member
 
Registered: Apr 2010
Posts: 1,292

Rep: Reputation: 222Reputation: 222Reputation: 222
check out Amanda backup.

http://www.amanda.org/
 
Old 12-16-2013, 05:10 AM   #4
sayhello_to_the_world
Member
 
Registered: May 2013
Posts: 221

Original Poster
Rep: Reputation: Disabled
hello you both,

thx for the quick answer

i user the following Method

i did a Backup of the public and secret keyrings and trust database

Code:
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...
gpg --export-ownertrust > chrisroos-ownertrust-gpg.
txt
and it worked

btw: on the new notebook i do the import of the three things:

pubring.gpg
secring.gpg
trustdb.gpg

on a sidenote: what is the trustdb.gpg?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Terminal directory in Backtrack 5 changed from "root@bt~#" to "sh-4.1# mdtmaverick Linux - Newbie 2 09-17-2012 02:44 PM
"Shared physical device" versus "Virtual network" ThomasRonshof Linux - Virtualization and Cloud 2 06-17-2011 03:27 PM
accidentally moved entire linux root "/ " file system to another directory bks2010 Linux - Newbie 8 09-19-2010 05:07 AM
chown - How do I set the permissions of an entire directory to "all" ? Evan. Linux - Newbie 2 01-17-2010 02:43 AM
GnuPG "ssb" & "sec" wwnexc Linux - Software 2 08-12-2006 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration