# What files should be backup?

**URL:** <https://community.letsencrypt.org/t/what-files-should-be-backup/101880>\
**Category:** Help\
**Created:** [September 12, 2019, 4:28pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880 "2019-09-12T16:28:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedrogglima](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/pedrogglima/32/34001_2.png) [@pedrogglima](https://community.letsencrypt.org/u/pedrogglima)\
**Post date:** [September 12, 2019, 4:28pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880/1 "2019-09-12T16:28:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [September 12, 2019, 5:23pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880/2 "2019-09-12T17:23:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![pedrogglima](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/pedrogglima/32/34001_2.png) [@pedrogglima](https://community.letsencrypt.org/u/pedrogglima)\
**Post date:** [September 12, 2019, 5:27pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880/3 "2019-09-12T17:27:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rip](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/rip/32/70863_2.png) [@Rip](https://community.letsencrypt.org/u/Rip)\
**Post date:** [September 12, 2019, 6:13pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880/4 "2019-09-12T18:13:03Z")

</div>

> [@Osiris](#):
>
> the whole `/etc/letsencrypt/` directory.

and everything it points to.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [October 12, 2019, 6:13pm UTC](https://community.letsencrypt.org/t/what-files-should-be-backup/101880/5 "2019-10-12T18:13:04Z")

</div>

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