Backup and restore

Hey! After reviewing the documentation, I realized that it does not contain anything about backup and restore of the configuration, users and other things about the backup process, who can advise?

1 Like

@sudouser We have plans for a firezone-ctl backup and firezone-ctl restore command in our backlog.

For the time being, something like this should probably work, but I haven’t tested it extensively:


# Stop postgres
firezone-ctl stop postgresql

# Backup
tar -zcvf firezone-backup-$(date +%s).tar.gz \
  /etc/firezone \ # Configuration
  /var/opt/firezone # Data

# Start Postgres
firezone-ctl start postgresql


# Unpack Firezone
dpkg -i firezone*.deb

# Restore
tar -zxvf firezone*.tar.gz -C /

# Reconfigure
firezone-ctl reconfigure

looks good but i think the postgres data might get corrupted if i copy it without stopping the service

True – it’d be helpful to do a firezone-ctl stop postgresql beforehand. I’ve edited to add. Thanks!

1 Like