Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion src/pages/selfhosted/maintenance/backup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

<Note>
For detailed information about each configuration file and its options, see the [Configuration Files Reference](/selfhosted/configuration-files).
Expand All @@ -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.
Expand Down