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.

  1. Stop Firezone (warning: this will disconnect any users connected to the VPN):
docker compose -f $HOME/.firezone/docker-compose.yml down
  1. 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

  1. Copy the files back to their original location:
tar -zxvfp /path/to/firezone-back.tgz -C / --numeric-owner
  1. Optionally, enable Docker to boot on startup:
systemctl enable docker

Need additional help?

Try asking on one of our community-powered support channels:

Or try searching the docs: