What files should be backup?

After generate a certification to my domain and setup it to my server running on docker container, how can I backup the certification data in a certain way that if a restart the docker container losing all data, I can add the backup certificate later to a new container running my server and domain?

I believe these are all my files generate by certbot:

- ls /etc/letsencrypt/
accounts  cli.ini  csr  keys  live  renewal  renewal-hooks

If I copy these files & folders to a new fresh container to certificate the same domain, using the same folders structure & server configs related to the certificate) should I be able to use the same certificate without generate a new one? I think that is the way and those are the files, but I would like some opinion before trying it. Maybe I’m missing something.

Also, apparently, this is a recommendation from certbot to backup the files, right?
Thanks in advance.

1 Like

Can’t you use “external” of “persistent” directories with Docker? If so, it would be wise to use that option for the whole /etc/letsencrypt/ directory.

2 Likes

Thank you for helping.
Your idea is better than mine. I will give a shot.

1 Like

and everything it points to.

2 Likes