Backup file exclusion

Good evening all…

I’ve got a need to use the backup/restore/HA feature to restore the config of the primary server onto the standby but its not a problem that the server’s IPs are different. At the trunking provider, we’ve got it programmed to overflow to the secondary server if the primary one doesn’t respond. But, it’s imperative the user database and settings remain intact across the servers.

However, I have an issue. In the SIP NAT settings, the public IP address is also being copied over. I located those settings in a file at: /etc/asterisk/sip_general_additional.conf.

I tried listing that as an exclusion in the directory backup of the folder ASTETCDIR, but it had no effect.

ANyone have any ideas how I can have the server NOT restore this file during the normal HA backup/restore routine?

TIA…

As a work around make the file readonly?

chmod -w /etc/asterisk/sip_general_additional.conf

It will try and restore, but fail. But yes that needs to be fixed at the source. (I believe they are aware of that, please wait . . .)

A more robust solution might be to consider deploying a true HA solution using corosync and drbd or iscsi. Where normally you will not need to backup/restore anything, it’s far less painful :slight_smile:

I’d love to do that, but lack the knowledge for such a setup. :frowning:

I thought that once too.

http://www.drbd.org/download/drbd-mc/

makes it much easier than it was.