High Availability Backup & Restore Module


I have set up 2 machines, with the latest build and done absolutly no configuration to them at all.

Unfortunatly for the life of me I cannot get the above mentioned module to work.

It took me a while to suss out the SSH key’s but the config beyond that I’ve left pretty basic. I have also found that dragging templates to a backup job seem to disappear as soon as you hit save, is this normal?

I seem to be able to get it to run backups locally but when I try and get it to do a remote backup with restore it fails. I wont paste the entire log it comes back with as it runs into 10’s of pages but the jist is below:

ntializing Backup 2
Connecting to remote server…
/bin/tar: Removing leading /' from member names /bin/tar: Removing leading/’ from member names
/bin/tar: Removing leading `/’ from member names
Prossesing received file…
Storing backup…
Running post-backup hooks…
Restoring backup…
/bin/tar: ./etc/freepbx.conf: Cannot open: File exists
/bin/tar: Error exit delayed from previous errors
[FATAL] a:16:{s:7:“fpbx_db”;s:0:"";s:10:“fpbx_cdrdb”;s:7:“mysql-4”;s:4:“name”;s:4:“test”;s:5:“ctime”;i:1331043267;s:5:“hooks”;a:4:{s:10:“pre_backup”;s:0:"";s:11:“post_backup”;s:0:"";s:11:“pre_restore”;s:0:"";s:12:“post_restore”;s:0:"";}s:21:“pbx_framework_version”;s:8:“”;s:14:“backup_version”;s:9:“”;s:11:“pbx_version”;s:6:“2.10.0”;s:9:“file_list”;a:2:{s:3:“etc”;a:2:{s:5:“dahdi”;a:4:

After the fatal it then spews out pages upon pages of code.

Is this module still in BETA? - If so i’ll leave it for a couple of weeks and try again


I cannot answer your question, just installed the new backup and restore module so have to figure it out myself.

But I wanted to ask if anyone at Freepbx can make a manual/tutorial on this new module. It has changed a lot and I find it difficult to configure now. As I’ve read in Philippes blog the ‘known issue’ with trunk failover should be solved now, but how do I configure this?

Hi Sc00by,

I’m seeing similar errors, but I do get to the end and have a valid backup file.
I have seen problems with this overall, not as smooth at the moment as the previous 2.9x version.

Did you upgrade everything up to the latest with the shell scripts?

Intializing Backup 4
Connecting to remote server…
/bin/tar: Removing leading /' from member names /bin/tar: Removing leading/’ from member names
/bin/tar: Removing leading /' from member names /bin/tar: Removing leading/’ from member names
Intializing Backup 4
Connecting to remote server…
/bin/tar: Removing leading /' from member names /bin/tar: Removing leading/’ from member names
/bin/tar: Removing leading /' from member names /bin/tar: Removing leading/’ from member names
Prossesing received file…
Storing backup…
Running post-backup hooks…
Restoring backup…
/bin/tar: ./etc/freepbx.conf: Cannot open: File exists
/bin/tar: Error exit delayed from previous errors
Running post-backup hooks…
Backup successfully completed!

Those are not errors.That is just telling you what it is doing. The only thing that could be a error is you are trying to include /etc/freepbx.conf.

The problem is the /etc/directory is owned by asterisk so it can not restore it. On a remote restore this file is not needed as it tells the system how to get the to database and each system has its own database connection so it would be foolish to back it up as the password from system A is not the same as system B for MySQL

Hi Tony,

The backup is based on EVERY option that is predefined to select to do a backup, I have not added ANY additional folders or files on that backup job.
I do usually add TFTP and thats it, but in this case didn’t.

Hi all,

Many Thanks for all the replies!

I did a complete format and reinstall of both of my systems and now its working.

However I still have the same issue with the GUI.

For example. If I drag across the Full backup template which populates the list with 6-7 entries, I fill in the rest of the settings, hit save but when i scroll back up the list where the 6-7 entries were, they’re gone. Usually replaced by 1 entry which is completly different. Sometimes 2 remain but never the original list.

Is there a manual available yet for this?

I’m also unsure how the Storage section works…


I have just done another fresh install and tried the backup & restore module via another PC/browser this time and still the same issue with the ‘Items’

If i drag across a template, say ‘Full Backup’ to the ‘Drop Here’ box it populates with 7 row’s (mysql config server, asterisk db, cdr, ASTETCDIR, AMPWEBROOT, AMPBIN)

As soon as i hit save a random amount disappear. Sometimes them all, other times, 1 will stay, maybe 2 but never the full selection.

Is it something I’m doing wrong, can anyone confirm if it’s happening with them or not?

This is the only issue holding me back from pushing it out to replace our aging trixbox setup


I haven’t seen that issue, several different ones on different servers all with or without a clean install. Did you update to the latest versions of everything via the shell scripts?

I installed it fresh this morning on completly different hardware and then ran a full module update and did various reboots.

I have just built a brand new xp with latest everything and tried it again with the same results.

I created a backup job, dragged over ‘Full Backup, Exclude Backup Settings, System Audio and Voicemail’. This gave me 9 row’s of backup items. As soon as i hit save I loose 5 (left with 4)

Can’t think of anything else to try…

Any help appreciated!

What browser are you using?
Thats the only thing I can think of, I can’t duplicate what your experiencing.
Maybe download chrome as an alternate attempt, make sure you have no viruses etc.

I have tried it with IE (with the chrome add in) and Chrome with the same results.

Does anyone know if there’s documentation on this updated module? I cannot get my SSH backups to work anymore!

I do not think their is yet. Someone needs to write up a good document on this.

Hi blackc2004, if you want PM me the links to screen shots etc and tell me whats happening and I can see if I spot the problem.

What are you running 2.9x or 2.10x?
When did this stop working?

Hi there. It stopped working with the 2.10 upgrade. I’m sure it’s just a setup issue because the setups are now so different. If we could just get updated documentation or an updated blog article that would be great.

This is the blog article I had used in the past to update it:

I’m not saying that the upgrade/conversion may or may not have worked, however I am saying set up everything from scratch in the new backup system and have a clean configuration.

If you see a migrated setting erase it, and build a new reference for your ssh server and the backup job.

To me that’s your best bet.

That reference is that old 2.9x and this backup software is a pretty big improvement/enhancement.

This HA solution is a precarious situation: the backup server is sitting in a state where a “reload” OR a server restart will cause it to register the trunks. This means that a power glitch that causes the server to restart will then cause the trunks to be registered. Both the primary and the backup servers will then be registering the same trunks at their assigned registration interval and calls will be going to one server and then the other. Ouch.

If only there were an Asterisk command to enable trunks - then you could have a script to enable the trunks; simply make a phone call and bring the backup online. I can’t find any way to enable trunks via the CLI or Asterisk commands. Does anyone know of a way?

Update your backup module for 2.10. There is a new option in the backup module tell it on restore to disable registered trunks.

I have four issues with my Backup and Restore job running on an hourly schedule

  1. All my phones try to register with the warm spare. I have changed the IP address of the warm spare server to a new address just in case some config was pointing to the warm spare as a backup proxy. The phones still show registered when I run cli> “sip show peers”
  2. When the warm spare backup job runs it gets the voicemails folders from the main server and restores them to the warm spare server. If you call the voicemail you can listen to the messages and delete them from the mailbox, then about 5 minutes later the phone MWI turns on again. When you call the voicemail there are no voicemails waiting. When I look at the main server the voicemail folder for the extension is empty but on the warm spare there are voicemails in the folder. I think this is caused by the phones registering with the warm server, so they turn on their MWI since that server has voicemails
  3. what are some example hook options
  4. the CDR records are not restored to the warm server but that is due to the master / slave setting in MYSql which I have not worked on yet.

I am running of the module on FreePBX

You totally lost me here. How would your phones know to register to the new PBX??? Each PBX has its own IP address.