Run a Backup¶
The Backup module captures UnifiedBX configuration (database + relevant files) into a tarball. Run before major changes (module updates, version upgrades, big config changes) and on a schedule.
Before You Start¶
- Storage has space (backups can be 100MB-2GB depending on system size).
- A Filestore location is configured if you want offsite backups (see Configure Filestore).
Run a one-off backup¶
- Go to System Admin → Backup & Restore.
- Click Backups tab.
- Click + Add Backup if no template yet, or trigger an existing template.
- Configure (for new template):
- Backup Name — e.g.
Daily Full. - Description — what it covers.
- Items to Backup — check all categories: System, FreePBX, Asterisk, CDR, Voicemail, System Recordings, etc. For most installs, leave default (everything).
- Storage Locations — pick destination(s) (Local, FTP, S3, etc. — must be configured in Filestore first).
- Pre / Post Hooks — optional shell scripts to run before/after.
- Maintenance — how many backups to retain. e.g. keep last
7.
- Backup Name — e.g.
- Click Submit.
- Click the Run Now icon next to the template to execute immediately.
- Click Apply Config.
Schedule recurring backups¶
- On the same backup template, scroll to Schedule.
- Pick frequency: daily, weekly, custom cron.
- Pick time of day (off-peak hours).
- Submit.
Verify¶
Watch the backup run on the Backup History tab — duration, size, success/failure.
ls -la /var/spool/asterisk/backup/<backup-name>/
The tarball should be there with a recent timestamp.
What's in a Backup¶
- Asterisk MySQL databases (asterisk, cdr, asteriskcdrdb, freepbx).
/etc/asterisk/config files./var/lib/asterisk/sounds/custom/(custom recordings)./var/spool/asterisk/voicemail/(if Voicemail is checked)./var/spool/asterisk/monitor/(if Recordings is checked — these are LARGE).- System config (network, firewall, sysadmin).
- Module list (so Restore can reinstall).
Common Issues¶
- Backup fails silently. Check Backup History for errors; tail
/var/log/asterisk/freepbx.logduring a manual run. - Backup huge / slow. Recordings included. Either exclude (separately back up
/var/spool/asterisk/monitor/) or accept the size. - No remote backup happening. Filestore destination not configured properly. Test the destination from Filestore module first.
- "Cannot connect to MySQL" during backup. mysqldump credentials wrong; usually means
/etc/freepbx.conflost permissions or password changed. Check. - Disk fills with backups. Maintenance setting (retention) not set. Set to
7and enable.