FreePBX15 – Warmspare

Philip Joseph

Philip Joseph

A Warm spare server is used as a failover mechanism to provide reliability in some system configurations. 

The warm spare is active and connected as part of a working system. When a key component fails, the warm spare is switched into operation.

Why would someone need a warm spare setup? 

If voice communication is the key part of your business and if any disruption in voice or telephony can affect your business or revenue, then it must be ensured that voice or telephony infrastructure is designed in such a way that it should always have a backup ready for the possibility of when a primary becomes non-functional.

Warmspare functionality provides the mechanism to keep a backup system with the same configuration as the primary server and is available to take over if there is any failure in the primary server.

FreePBX Warm Spare Functionality 

FreePBX 15+ provides easy to configure warm spare functionality with the help of an improved Backup & Restore module, redesigned completely in FreePBX15+.

In older versions of FreePBX, warm spare functionality was configured on the spare server.  The spare server would connect to the primary server using SSH to perform backup and restore jobs that keep itself up to date.  All activities were controlled by the spare server.

With FreePBX 15+, we have changed the way you can configure the spare server – you can configure it from the primary server itself along with all backup and restore functions which are administered via the primary server.

FreePBX 15+ uses the combination of three modules:  Backup and Restore,  FileStore, and API, to build the warm spare backup server.


Setting Up Warm Spare in FreePBX 

On FreePBX 15+ systems, the warm spare configuration is part of the Backup & Restore module.

These are the steps to do warm spare setup:

  1. Create a warm spare server configuration using the Filestore module.  We can use either SSH or FTP protocol to communicate with the warm spare server.
  2. Create a backup job. Refer to the wiki for “FreePBX 15 Backup & Restore” wiki.
  3. FreePBX 15+ provides a mechanism to select modules to be included in backups.  Select the required modules which need to be synced to a warm spare server.
  4. Enable the Warm Spare option.  Refer to the wiki for “How to set up a Warm Spare Backup job“. 
  5. Set the Warm Spare configuration options.

We have recently added a new option called “Exclude Trunks” to the Warm Spare settings in FreePBX 15+ systems.

The “Exclude Trunks” configuration option will prevent the primary server’s trunks from getting restored to the warm spare server. This will help in the situation where we want to have trunk settings on a warm spare server that are different from what’s on the primary server.  Both servers’ trunks are registered to the provider so in the case of failure, SIP providers will also automatically switch to the warm spare’s registered trunks to avoid call failure. 

The “Exclude Trunks” option will also ensure that trunks associated with outbound route settings are not syncing to the Warm Spare server.

Triggering a Restore to the Warm Spare Server 

The Filestore module will take care of transferring the primary server configuration backup file to the warm spare server. 

There are two ways to trigger the “restore” process in a warm spare server so that the warm spare server keeps getting updated with the primary server’s data.

  1. GraphQL API
  2. SSH

Connection Over GraphQL API

GraphQL API connection is preferred when we want to connect to a spare server over FTP, or if we want to use HTTP communication between a warm spare and primary server.

Please refer to “How to configure API for Warmspare setup” wiki guide for more details.

Connection over SSH

SSH connection is the preferred method to minimize hassle if you have selected SSH protocol for the communication between primary and warm spare server while creating the warm spare server configuration in Filestore.

SSH connection details need to be filled in the Filestore module.  In the Backup module, you just need to select the warm spare server on the Warm Spare section.

The SSH connection is the most preferred way to configure a warm spare server.

References: 

Feedback

Please provide feedback by either raising issues on the open-source bug tracking system or submit feature requests or improvements to enhance this module’s functionality.

Thank you for using FreePBX,

Philip Joseph

Share this Blogpost

Start the Discussion

Sign up for our Newsletter

Scroll to Top