At my work we have just recently started using Elastix, switched from trixbox mainly because the backup module that Elastix has is much more robust and covers almost all the configuration of the server. The only problem is that it doesn't have any way to schedule backups. Freepbx does have a backup module with scheduling, but its backup doesn't cover all the services and configurations that the backup module does.
Originally I was going to just make a cronjob that sent the html POST to the backup module to tell it to make a backup, but after looking into that and the amount of data I'd have to send to trigger a full backup, I shelved that idea.
Instead I've written a perl script that does basically the same thing as the backup module that comes in Elastix, except of course you can run it from the command line instead of having to use the web interface. This makes it possible to put it in a cronjob or anything else to have regular backups created automatically. The files made can be selected and restored via the web interface.
Please note there's not a lot of error correction in this script. If commands fail it probably isn't going to tell you about it. It's the first revision and I'll be making a better version in the future, but for now it works and is running on my system. I thought it might be useful to others so I am posting it.
-Marie
File Attachment: File Name:
backup.tgzFile Size: 2267