Need clarification about account recovery


Sorry if this is asked before, but after some searching, with forum search function and Google, I couldn’t locate any clear answer about this issue.

I use Certbot-auto to get a certificate onto my Raspberry Pi, Certbot asked me to backup /etc/letsencrypt, which I did with the following commands:

cd /etc/letsencrypt
sudo tar cvpzf ~/letsencrypt.tar.gz .
# On my Windows machine: 
scp pi@ ~/letsencrypt.tar.gz
# I then exported the file to C drive

So my questions are:

  1. Is the command for backing up the folder correct?
  2. If I wipe the server, how do I recover from backup? Do I simply copy the tar back onto Raspberry Pi and extract the files? Would these commands be appropriate to extract the tar?
cd /etc
sudo tar xf ~/letsencrypt.tar.gz


@schoen Can you help find an answer for this one?


I believe this would work OK. The one minor point is that if you create the backup of . relatively to /etc/letsencrypt, you would want to extract it the same way. The way that you suggested would put all of the files back into /etc rather than into /etc/letsencrypt.

One important detail is that you need to preserve symbolic links in your backup, because they are used by Certbot as part of the data structure in /etc/letsencrypt. However, this method does preserve them, so it should work.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.