You're viewing documentation for the legacy version of Firezone, now End-of-Life. View the latest docs here.
Backup and Restore
Firezone can be safely backed up and restored in a couple of minutes under most circumstances.
This guide is written for Firezone deployments using Docker Engine on Linux only.
Unless your hosting provider supports taking live VM snapshots, you'll need to stop Firezone before backing it up. This ensures the Postgres data directory is in a consistent state when the backup is performed. Backing up a running Firezone instance will most likely result in data loss when restored; you have been warned.
After stopping Firezone, backing up Firezone is mostly a matter of copying the relevant files and directories to a location of your choosing.
See the steps below for specific examples for Docker and Omnibus.
Backup
For Docker-based deployments, this will consist of backing up the
$HOME/.firezone
directory along with the Postgres data directory, typically
located at /var/lib/docker/volumes/firezone_postgres-data
on Linux if you're
using the default Docker compose template.
- Stop Firezone (warning: this will disconnect any users connected to the VPN):
docker compose -f $HOME/.firezone/docker-compose.yml down
- Copy relevant files and folders. If your made any customizations to
/etc/docker/daemon.json
(for example, for IPv6 support), be sure to include that in the backup as well.
tar -zcvfp $HOME/firezone-back-$(date +'%F-%H-%M').tgz $HOME/.firezone /var/lib/docker/volumes/firezone_postgres-data
A backup file named firezone-back-TIMESTAMP.tgz
will then be stored in
$HOME/
.
Restore
- Copy the files back to their original location:
tar -zxvfp /path/to/firezone-back.tgz -C / --numeric-owner
- Optionally, enable Docker to boot on startup:
systemctl enable docker
Backup
- Stop Firezone (warning: this will disconnect any users connected to the VPN):
firezone-ctl stop
- Copy relevant files and folders:
tar -zcvfp $HOME/firezone-back-$(date +'%F-%H-%M').tgz /var/opt/firezone /opt/firezone /usr/bin/firezone-ctl /etc/systemd/system/firezone-runsvdir-start.service /etc/firezone
A backup file named firezone-back-TIMESTAMP.tgz
will then be stored in
$HOME/
.
Restore
- Copy the files back to their original location:
tar -zxvfp /path/to/firezone-back.tgz -C / --numeric-owner
- Reconfigure Firezone to ensure configuration is applied to the host system:
firezone-ctl reconfigure
Need additional help?
Try asking on one of our community-powered support channels:
- Discussion forums: Ask questions, report bugs, and suggest features.
- Discord server: Join discussions, meet other users, and chat with the Firezone team
- Email us: We read every message.