diff --git a/src/pages/selfhosted/maintenance/backup.mdx b/src/pages/selfhosted/maintenance/backup.mdx index 9952bcab..6075456f 100644 --- a/src/pages/selfhosted/maintenance/backup.mdx +++ b/src/pages/selfhosted/maintenance/backup.mdx @@ -2,11 +2,15 @@ To back up your NetBird installation, you need to copy the configuration files and the Management service databases. -The configuration files are located in the folder where you ran [the installation script](/selfhosted/selfhosted-quickstart#installation-script). To back up, copy the files to a backup location: +The configuration files are located in the folder where you ran [the installation script](/selfhosted/selfhosted-quickstart#installation-script). To back up, copy all the files to a backup location: ```bash mkdir backup cp docker-compose.yml dashboard.env config.yaml backup/ ``` +optionally, copy all remaining files depending on the install method and reverse proxy chosen on install +```bash +cp -r crowdsec proxy.env traefik-dynamic.yaml +``` For detailed information about each configuration file and its options, see the [Configuration Files Reference](/selfhosted/configuration-files). @@ -33,6 +37,27 @@ docker compose cp -a management:/var/lib/netbird/ backup/ docker compose start management ``` +# Restore Your Self-Hosted NetBird Installation +# Restore Your Self-Hosted NetBird Installation + +This amounts to following the above steps in reverse. You do not need to reinstall NetBird using the installation script, and copying partial backups will likely fail due to secrets and configuration keys which would need to be regenerated. + +Instead, simply copy all files to a new folder, and restart the containers. + +Assuming Traefik has been used as the reverse proxy, and CrowdSec Reputation Scan has been added on install: + +```bash +cd ./backup +cp -r docker-compose.yml dashboard.env config.yaml crowdsec proxy.env traefik-dynamic.yaml .. +cd .. +docker compose create +docker compose cp -a ./backup/netbird netbird-server:/var/lib/ +docker compose up -d +``` + +You should now have a working NetBird instance again, and can log into the your backend under netbird.example.com + + ## Get In Touch Feel free to ping us on [Slack](/slack-url) if you have any questions.