How to Back Up and Restore an Asterisk/FreePBX Configuration

Losing your PBX configuration means losing extensions, routing rules, voicemail, and potentially call recordings — a genuinely disruptive event for a phone-dependent business. This guide covers proper backup and restoration.

What Needs to Be Backed Up

  • Configuration files (extensions.conf, sip.conf/pjsip.conf, and related Asterisk configuration)
  • FreePBX database (contains most configuration in database form, not just flat files)
  • Voicemail messages
  • Call recordings, if retained (see How to Set Up Call Recording and Compliance Logging)
  • Custom prompts/greetings (recorded audio files)

Using FreePBX's Built-In Backup Module

FreePBX includes a native Backup & Restore module (Admin > Backup & Restore) — handles both configuration database and associated files in a single, coordinated backup, generally preferable to manually backing up individual components separately.

Scheduling Automatic Backups

Configure the backup module for scheduled, recurring backups (not just manual, one-off backups) — see How to Set Up Automated Backup Verification and Alerting for the general principle of ensuring scheduled backups actually run and succeed consistently.

Storing Backups Off-Server

rsync -avz /var/spool/asterisk/backup/ user@backup-server:/backups/pbx/

See Backup Strategy 101: The 3-2-1 Rule Explained — ensure backups are stored somewhere other than the PBX server itself; a server-level failure that takes down the PBX shouldn't also take down its only backup copy.

Manually Backing Up Raw Asterisk Configuration (Non-FreePBX)

tar -czf asterisk-config-backup.tar.gz /etc/asterisk/

For a raw Asterisk installation without FreePBX, back up the configuration directory directly — simpler than FreePBX's database-driven configuration, but still requires deliberate, scheduled backup discipline.

Backing Up Voicemail Separately if Needed

tar -czf voicemail-backup.tar.gz /var/spool/asterisk/voicemail/

Testing Restoration Before You Need It

See How to Test and Verify Your Backups Actually Work — periodically test actually restoring your PBX backup to a separate test instance, confirming the backup genuinely captures everything needed for a functional restoration, not just assuming success based on the backup process completing without error.

Restoring from a Backup

Use FreePBX's restore functionality (matching your backup approach) on a fresh installation, or manually restore configuration files/database for a raw Asterisk setup — follow your specific platform's documented restoration process rather than improvising.

Documenting Your PBX-Specific Recovery Process

See How to Document a Disaster Recovery Runbook — given the genuine business impact of extended phone system downtime, ensure your PBX recovery process is clearly documented, similar priority to other business-critical systems covered throughout this Knowledge Base.

Considering Recovery Time in Your Planning

See Understanding RPO and RTO: Setting Realistic Recovery Objectives — understand how quickly you can genuinely restore PBX functionality from backup, and whether this recovery time meets your business's actual tolerance for phone system downtime.

Common Errors

Restored PBX is missing recent extension changes — verify your backup schedule frequency matches your actual configuration change frequency; infrequent backups combined with frequent configuration changes creates a genuine gap risk if restoration is ever needed.

Continue Reading

Browse more articles in VoIP & Communication Servers.

  • freepbx backup restore, asterisk configuration backup, pbx disaster recovery, voicemail backup asterisk
  • 0 brukere syntes dette svaret var til hjelp
Var dette svaret til hjelp?

Relaterte artikler

How to Install Asterisk PBX on a VPS

Asterisk is the foundational open-source telephony engine powering most self-hosted PBX systems...

How to Install FreePBX on a VPS

FreePBX is a widely-used, open-source web interface built on top of Asterisk — making PBX...

How to Set Up SIP Trunking for Your PBX

A SIP trunk connects your self-hosted PBX to the public telephone network, letting you make and...

How to Configure Extensions and Voicemail in Asterisk

Extensions are the individual phone lines within your PBX system, and voicemail lets callers...

How to Secure a VoIP Server Against Toll Fraud

An unsecured VoIP server is a common target for toll fraud — attackers who compromise weak...