How restore backuped /.gnupg/private-keys-v1.d

Ondřej Střeštík ondrejstrestik at gmail.com
Sat Dec 10 11:33:54 CET 2016


Thank you very much, It worked. Word is beautiful again :-D

Ondrej

pá 9. 12. 2016 v 21:12 odesílatel Werner Koch <wk at gnupg.org> napsal:

> On Fri,  9 Dec 2016 16:03, ondrejstrestik at gmail.com said:
>
> > i have reall big problem because i accydently deleted /.gnupg, but still
> i have backuped /.gnupg/private-keys-v1.d so i have 4 “hashfile" name files
> with suffix .key
>
> That good.  Run gpg once to create a new .gnupg directory (or create it
> manually).  Then copy the four files to the new private-keys-v1.d
> directory and you have restored the secret key material.  Now you need
> to get a copy of your two (I guess) public keys.  They should be on the
> keyservers or you have send them to other places, get a copy and gpg
> --import them.  Better restart the gpg-agent (gpgconf --kill gpg-agent).
> That's it.
>
> If you can't find the public keys, there is no real damage because the
> nobody sent you encrypted data or nobody else cared to verify your data.
>
> > - i thought i will copy private-keys-v1.d back to the ./gnupg and
> everything will be ok (like ssh)
>
> Partly.  All the secrets are restored as I explained above.
>
> > Now i am i situation where i can not import “raw” keys and everytime
> > when i try to import private key i will get message like: No valid
>
> What do you mean by raw key?  You are looking for files created with
>
>   gpg --export
>
> or
>
>   gpg --export --armor
>
> or with any other OpenPGP tool.  You can implement such files with
>
>   gpg --import
>
> Take care that they are not encrypted (some people do this) and that
> they are not gzipped etc.  Using the extra option -v is always a good
> idea in such cases.
>
>
>
> Shalom-Salam,
>
>    Werner
>
> --
> Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/attachments/20161210/fbc09965/attachment.html>


More information about the Gnupg-users mailing list