Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Backup and restore

Backups are the operator’s responsibility; the PBX provides the two commands. They run on the VM, as root, with the service’s settings.

What a backup contains

A .tar archive:

  • the whole database: the PBX and the FusionPBX tables;
  • the keyring of the encryption keys. Without it, the database secrets (trunk and email server passwords, webhook and two-step verification secrets…) would be unreadable; it is therefore included, and the archive is as sensitive as the machine: it is created readable by its owner only, to be kept outside the VM, encrypted or in a protected place;
  • the FreeSWITCH files: call recordings, voicemail, announcements, music on hold;
  • a manifest: PBX version, schema version, date.

The machine configuration (nginx and its certificate, /etc/freeswitch, systemd units) is not part of it: it comes from the installation.

Backing up

Live, services running:

sudo sh -c 'set -a; . /etc/centrex-v3/centrex.env; \
    centrex sauvegarder --sortie /srv/backups/centrex-$(date +%F).tar'

Schedule it daily (systemd timer or cron), copy the archive outside the VM, and keep several generations.

Restoring

On a VM installed with the same version (or a newer version) of the PBX:

  1. Describe the archive, without replacing anything:

    sudo sh -c 'set -a; . /etc/centrex-v3/centrex.env; centrex restaurer --archive centrex-2026-10-12.tar'
    
  2. Stop the PBX and FreeSWITCH (sudo systemctl stop centrex freeswitch), then restore, with --confirmer. The database is replaced in one transaction; keys and files are copied back.

  3. If the archive comes from an earlier version: centrex migrate. An archive from a newer version is refused.

  4. Restart FreeSWITCH, then the PBX.

Try a restore on a test VM from time to time: a backup never restored is not a backup.