Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Note

This information on this page applies only to PBX versions 14.x and lower. For version 15+, please see: Warm Spare Backup Server 15+


Table of Contents

Introduction

This guide will walk you through the process of setting up a warm spare server.

Info
titleAPPLICATION NOTE

You will need 2 PBX servers of the same model with identical hardware including analog and digital cards.

Each server must have it's own set of licences for any commercial modules used.

This article assumes the following:

  • You have an existing a PBX system that will be your primary server.

  • You have an identical PBX system equally licensed that will act as the warm sparebe your secondary server.
  • Both servers have identical Analog/PRI/BRI hardware (if used).
  • The two servers can communicate on an IP level with each other on port 22.

Setup

SSH Keys

Setting First we will set up share keys between the two servers so they can communicate across SSH on port 22.

Begin by creating a user and an SSH key on our your warm standby server so that it can log in to the primary production server and transfer backups to itself.

Login to your backup server with an SSH client such as PuTTy, SecureCRT, or other SSH client.

At the prompt type:  sudo  sudo -u asterisk ssh-keygen

Info
titleAPPLICATION NOTE

You will be asked 3 questions, simply . Simply press "Enter" to accept the defaults.

Now Next we will copy the key to the primary server so that the backup server can SSH to the primary server without needing a password. Issue the command. 

At the prompt type: sudo -u asterisk ssh-copy-id -i  /home/asterisk/.ssh/id_rsa.pub root@PrimaryServerIP And and enter the password when prompted. 

Info
titleAPPLICATION NOTE

Make sure you replace the PrimaryServerIP with the IP Address of your primary PBX. (use IP and not a hostname that may be common to both primary and warmspare)

If this command completes without error we , you are ready to test:

At the prompt type: ssh -i /home/asterisk/.ssh/id_rsa .pub root@PrimaryServerIProot@PrimaryServerIP

If all went well, you should now be logged in to the Primary server.

Creating the Backup Job

Now we will log into the warm spare PBXact's administration GUI.

  • From your browser, go to http://IPADDRESS and then click on PBX Administration.
  • In the pop up, enter your username and password, then click continue.
Info
titleAPPLICATION NOTE

Replace IPADDRESS with the actual IP address of your warm spare. This assumes you are on standard port 80. If you are using a different port or https, please adjust accordingly.

Image RemovedImage RemovedImage AddedImage Added

Once Logged in:

  • Click Admin
  • In the drop down click Backup & Restore 

Image RemovedImage Added

You should now see the following:

Image RemovedImage Added

We will now define the primary PBX as a new server for this warm spare server to reach into and perform the backup on.

Click on the “Servers” option Servers option on the right side and it . It will bring up a page like this:

Image RemovedImage Added

Click on the "the Add Server button.

Image Added

Select the New SSH Server" option so we can setup the server option from the drop down menu.
Image Added 

 

You will be taken to a form where you can enter information on where and how to connect to the primary PBX in order to get the backup data from.

Image RemovedImage Added

We are going to define the following fields for this server and press the “Save” button.:

  • Server Name- We will Name - A name for this server. In our example we could call it “Primary PBX”PBX."
  • Hostname- Define the Description - A description or notes to help you identify this server.
  • Hostname - The IP address or FQDN of the primary server.
  • PortPort - By default we use port 22 for SSH.
  • User Name- root Username - The SSH username. In our example we would enter "root" because it is the username we setup set up for our share keys.
  • KeyKey - This is the path to location of the private SSH Key key that we created earlier of . In our example it is /home/asterisk/.ssh/id_rsa
  • Path - Path on the remote server where files are stored. (Recommended setting → Leave this empty) 

Click the

...

Save button. Note: there is no apply config button.

Image Added

Now that we setup have set up the primary server location information in the backup module, we will create an actual backup job by clicking on the “Backups” Backups option on the right side of the screen. which This brings us back to the landing screen.

Image Removed

Click on "New Backup"

Image Removed

the New Backup button.

Image Added

This will take you to a form where you can enter information about a new backup job as described below.

Image Added

Image Added

  • Backup Name - The Name should be something representative of the task. We will call it "Nightly Warm Backup"Next Drag over the
  • Description - A description or notes to help you identify this backup.
  • Status Email - An e-mail address to send status messages to when this backup is run.
  • Items - Drag the desired template(s) from "Templates" to "

    Backup

    Items." For this task we will drag

    over

    "Full Backup" and "Exclude Backup Settings"

    For "Backup Server" Select your primary

    to the backup items on the left.

    Warning

    Failing to include the "Exclude Backup Settings" in the warm spare backup job will cause the backup jobs on the primary system to overwrite all backup jobs on the spare. You need this item included in all warm spare type backups.


  • Backup Server - Select your primary PBX in the drop-down.
    • A
    "
    • Restore Here
    " Check box
    • option will appear.
    Check the box. 2 additional boxes will appear
    • "Disable registered trunks" This option is only needed if you have SIP trunks that Select Yes. This will cause 3 additional settings to appear.
    • Disable Registered Trunks - Select Yes if SIP trunks are registered with your carrier, or if the two systems will compete for the trunk registration.
    •  "Apply Configs" Check this box
     
    • Otherwise you can leave set to No.
    • Exclude NAT settings - Select Yes if you want to exclude any machine-specific IP settings. This allows you to have a warm-spare machine with a different IP address.
    • Apply Configs - Select Yes. This is equivalent to clicking the red apply config button, will happen automatically after a restore on a standby system
      Image Added
     
  • Storage Servers and Available Servers - If you want to also store a copy of the backup file on this server you can pick the “Local Storage” option under the “Storage” location by dragging it over.Set "Run Automatically" to "Daily" , drag the Local Storage item from the Available Servers bin on the right to the Storage Servers bin on the left.
  • Run Automatically - Set this to Daily. This  will cause the script to run each day at midnight.Press "

Click the Save

...

button when done.

...

Image Added

Running the Backup Job Manually

After saving, if not already back on the main page, click Backups in the menu at the right side of the screen. This will take you back to the main page.

Image Added

To run the backup job and test all the settings

...

, click the run button Image Added for the backup. The backup job may take a while.

Image Added

Failing

...

Over to the Backup Server

In the event that you would like to make your backup server become the production server we , you would need to perform a few tasks.

Network

We You need to update the IP Address of the backup box to be the IP Address that the (current) Primary PBX was 's IP Address so the phones and trunks know how to register to it.

Login to Log into the web UI of the warm spare

...

and go to Admin → System Admin.

You should see the page below:

Image RemovedImage Added

On the right, click "Network Settings" you . You will then see the following:

Image RemovedImage Added

From here you From here, you can change the IP address of the backup server to be the same IP that your production server was.

Info
titleAPPLICATION NOTE

Don't forget to remove the production server from the network before Updates changing the IP changing the IP address here, or you will have an IP address conflict.

...