From c976d36c958260bee084dc675d927f0fc67563dc Mon Sep 17 00:00:00 2001 From: Paula Winter <79701032+paula-coder-646@users.noreply.github.com> Date: Mon, 4 May 2026 10:33:00 +0200 Subject: [PATCH] Update backup.mdx - add restore instructions and update backup files - Added section about restoring a backup - Updated "Back Up" section to include all files currently generated by the installation script (traefik, crowdsec, proxy.env) --- src/pages/selfhosted/maintenance/backup.mdx | 27 ++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) 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.