# Backup / restore in hosted server

**URL:** <https://openziti.discourse.group/t/backup-restore-in-hosted-server/1568>\
**Category:** Uncategorized\
**Created:** [August 28, 2023, 10:43am UTC](https://openziti.discourse.group/t/backup-restore-in-hosted-server/1568 "2023-08-28T10:43:01Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [August 28, 2023, 12:37pm UTC](https://openziti.discourse.group/t/backup-restore-in-hosted-server/1568/4 "2023-08-28T12:37:35Z")

</div>

I'd tell you to take JUST the `$ZITI_HOME/pki` folder, the controller's configuration file (If using "the host it anywhere" quickstart it'd be named: `$ZITI_HOME/$ZITI_NETWORK.yaml`) and the db snapshot. Oh and actually, you might want to also backup the systemd file at `/etc/systemd/system/ziti-controller.service`

We don't have this whole process documented at this time and I will admit that I have not tested this myself yet but here's the process that you should be able to use to restore:

- put back systemd unit file `/etc/systemd/system/ziti-controller.service`
- put back yaml file at `$ZITI_HOME/$ZITI_NETWORK.yaml`
- put pki directory back into `$ZITI_HOME/pki`
- put db back into `$ZITI_HOME/db/ctrl.db` (notice I renamed it, without the timestamp)
- enable the systemd unit file: `sudo systemctl enable --now ziti-controller`

---

_[View the full topic](https://openziti.discourse.group/t/backup-restore-in-hosted-server/1568)._
