Best way to backup entire FreePBX 6.12.65/CentOS 6.5 server?

While I know the purpose of the freePBX backup module is to backup specific directories of FreePBX, so that in a disaster, you can do a fresh install of FreePBX and using the backup module, can restore those directories and be up and running. The only problem is that I need to restore several other programs on the same server. Examples are the Flash Operator Panel 2 software, which resides in it’s own directory (and has it’s own dependancies, which I don’t plan to track down and backup individually). Another example is the hack that converts your wav voicemail email attachments to mp3 with gives you a 15 second transcription (with it’s own dependencies, which I again don’t want to track down).

So I have looked far and wide for full system backup/recovery tools in CentOS. I’ve reviewed the following with my observations:

dd if= of= (apparently short for Disk Destroyer, for what it could do if you get one option wrong). While it does get the job done, it is slow due to inability to know what part of the disk is empty. It backs up the entire disk (requiring an equal or larger disk to backup to). It apparently has a “conv=sparse” option, but this still seems to copy the entire disk before removing empty space (either that or my disk has a lot of old data still in the empty blocks and I need to zero those out). Apparently there are ways to pipe over to gzip to handle sparse the empty space, but as far as I can tell, it would still need to image the entire drive and then pass that file to gzip (correct me if I’m wrong).

CloneZilla: has to run on a LiveCD/usb, which requires shutting down the server and rebooting to the LiveCD/usb, which is not an option for my production server. (or you can run the SE version on a separate server, but I need a self contained system here).

PartImage: Seems like it has the options I need, however does not support Ext4 which is the FreePBX 6.12.65 distro default. It also requires downloading many dependencies before you can compile the source - last thing I want to do during a disaster recovery situation with the whole company breathing down your neck when phones are down. If it only supported Ext4 and had yum install support, it might be good.

FSarchiver: Seems to be the best solution given my situation. Though it seems to do file-level backups instead of a whole harddrive/partition structure.Not a must, as I could do a fresh install of FreePBX/CentOS distro and then recover with FSarchiver. But it doesn’t recommend backups on a read/write mount (which is the case for production servers) as files will be changing and something could get lost during the backup process (unless you do an lvcreate -s if you have LVM support). I do have an LVM setup it seems, but I need to dig into how this works.

Norton Backup/Recovery for Linux: Way more than I want to pay for use with only one computer. Maybe if we had a farm of computers. Needs better pricing model for low end usage.

Just an idea I had, can you use the FreePBX backup module to backup the entire partition? Give a directory of /? Not sure how you would recover with that file, but it’s just a thought.

Hopefully this gives other people ideas and any recommendations/comments would be helpful for the entire community, I’m sure.

1 Like

If you can’t find a time to down the server, have you considered running redundant servers using the high availability features of FreePBX. You could down one server and back it up plus the chance of failure is much reduced in any case. If your system is that critical, what would a failure cost?

$1,500 + special appliances is just overkill. I will be setting up a backup server, but being down for 10 minutes or less for the switchover isn’t worth that much in my scenerio. Maybe if it was $200 - $300.

Then FreePBX HA isn’t for you! You can do what you want with the Backup module, for free, in that case :sunglasses:

(Edit: On re-reading, I should clarify, HA doesn’t need any special hardware. It’ll work with two of anything that’s reasonably similar. But for people that DO care about less-than-a-second-per-year outages, you do want to get proper hardware, with IPMI support. HA supports DRAC, ILO, VMware and Generic IPMI)

Use the ‘Restore to this server’ option in Backup, and you can have a warm standby machine ready to go, and completely up to date (possibly missing some voicemails) that’ll only need you to log in and change the IP address to get your phone system up and working.

My answer as to voicemail is alluded to here:-

rsync -nav --progress /var/spool/asterisk/voicemail yourbackupserver:/yourbackupdirectory/${HOSTNAME}/

do the same with /var/spool/asterisk/monitor directory

set a cron job to run every minute, it’s very quick and not onerous :wink:

if it looks good take out the n

1 Like