FailOver Setup

Okay, I am new to Linux in general and have been given a new task.

I have 2 PBX’s setup with the latest FreePBX Distro. Both boxes have an extra Drive installed and mounted with no data, to be used for mirroring if possible.

What I want to do is setup a primary and a secondary server (different IPs)with a failover so that in the event of a hardware failure on the primary the secondary server will take over calls. I need the Primary server to mirror its settings to the secondary server automatically, so that there is little or no intervention required to failover to the secondary server.

Does this make sense?

So, I am looking for some help on what the best way to accomplish this is, and since I am new to linux I need a little help with the proper commands to accomplish this task.

any help would be greatly appreciated.

thank you.


I have also just posted a similar question at:

I give data on how I am currently mirroring my servers. I also have a /tftpboot directory which I copy over since this has my IP Phone configuration files.


we are running same kind of setup with asterisk and not freepbx but that will not make any difference. First you need to make them both identical in each respect. Then you can mirror the settings of main server to backup server by using cron job schedular to schedule rsync or some custom script to copy the most used and critical files to the backup server on daily basis. Even you can sync whole folders this way. We use to schedule it for every 12 hours, you can use your own suited time.

Guys the backup module has this built in already

Thanks for the feed back.
What critical files/folders do you recommend? Are there database updates to MySQL that need to be accounted for in the restore proccess? If is alright with you could you post a script of what you do to mirror them.

The best thing would be if there is a command line option to restore a backup without using the web interface. Do you know of such an option?

I know lot of questions.


I have not used the backup module before, is there instructions how to set this up?

Yes it does. I’m looking at automating the process so I can take the manual process of the restore out.

Does the Backup Module have a command-line option to restore? If so I can include this in my cronjob script to


That is what I am saying. You can setup a backup system that logs into the production system. Does a backup and restores it on the backup system automatically. Its all built in the backup module. The 2.10 version expanded this even more.

Their is a blog about warm spare setup in by Moshe from a year or 2 ago.

Thanks! I will check out that blog.
Just checked my installaion and I have Backup/Restore module Appreciate the help.


Excellent news… the ability to do this easily will make adoption so much easier.