How to Backup and restore Elastix Asterisk configuration on Cent OS to another server

How to Backup and restore Elastix Asterisk configuration on Cent OS to another server

I recently found this method of doing the backup/restore

A few things to be aware of

  • Make sure the Elastix version is the same or higher than the version that you are transferring the backup .tar file from. Otherwise if you try to transfer to an earlier version the extensions will not transfer across correctly.
  • you have to manually transfer any custom sounds that you have created to var/lib/asterisk/sounds/custom
  • The location of the backup is not the same on all versions of Elastix. (ie v1.6 is located at /var/www/backup)
  • make sure your FreePBX updates are performed on both systems before transferring and restoring the backup

On the source system from within Elastix go to System then Backup/Restore

Select all and backup. This stores a file like


From a Windows system you may then use an SFTP client like filezilla or winscp to connect to the server as user root and copy the above backup file.

Or say you have a USB stick, you can mount it and copy the file

Mount and then copy the tar file to the usbstick. See for more detail on mounting a USB stick.

cd /var/www/html/backup
mkdir usbstick
mount -t vfat /dev/sdb usbstick
cp elastixbackup-20100526234106-u3.tar usbstick
umount usbstick

You should now have a copy of the backup on your usb stick ready to restore to a new system build.

Run up a base copy of elastix on another server.

insert elastix CD
boot it, follow the bouncing ball
once it’s up, go into the PBX settings, choose Unembeded PBX
go into Module Admin and search for updates.
download and install, repeat 5/6 until there are no more
Mount the usbstick and copy the file to the backup folder
From within elastix go to backup/restore and restore the copied file.
If the restored file does not show up, try running an initial backup of second server and then move your previous backup to that dir and see if it shows up

The linux networking settings are not restored from the backed up asterisk configuration. The three files that affect networking are:

/etc/resolv.conf where you set the dns servers
/etc/sysconfig/network where you set the default gateway
/etc/sysconfig/networking-scripts/eth-cfg(0,1) which have the stuff for static or dhcp.

Most likely the eth-cfg1 file doesn’t exist or doesn’t have any useful values in it. Googling “centos networking” or eth-cfg0 should get you some suitable templates.

To restart networking after making a change, server network restart

To play around with the command line without having to visit the console, use an SSH client like “putty”
Login as root
Do not redirect the SSH port to elastix, that password is not very secure.

To see if there’s a firewall running, type “iptables -L”
You should see 3 sections with nothing in them. That means no firewall.
If you see something there, do
/etc/init.d/iptables save
/etc/init.d/iptables stop
then you need to look at why there was a firewall there. Default elastix has no firewall.

Some more backup for asterisk info can be found here