Excluding Call Recordings Overide Location using Warm Spare Method

I am using FreePBX Distro 14.

I am using the warm spare method documented here: https://wiki.freepbx.org/display/FPG/Warm+Spare+Setup

On my primary server, I have an attached volume dedicated for call recording storage. I don’t have that same configuration on the backup server. (The cloud host where it is hosted doesn’t support block storage yet)

Is there a way to exclude the overridden call recordings location path from the primary server when the backup is restored to the warm spare server?

Thank you!

You will need to run a script post restore and use fwconsole to reset values:

[root@freepbx ~]# fwconsole setting -d | grep MIXMON_DIR
MIXMON_DIR=
[root@freepbx ~]# fwconsole setting MIXMON_DIR /tmp
Changing "MIXMON_DIR" from [] to [/tmp]
[root@freepbx ~]# fwconsole setting -d | grep MIXMON_DIR
MIXMON_DIR=/tmp
[root@freepbx ~]# fwconsole setting -r -q MIXMON_DIR
[root@freepbx ~]# fwconsole setting -d | grep MIXMON_DIR
MIXMON_DIR=

Hi Lorne

Thanks for the reply. When defining the script in the backup module, do I need to separate commands by comma’s or anything? Probably a stupid question but I’ve never ran a script from the backup module so I’m not sure on the correct formatting.

Is the example your provided what the contents of my script should be?

Thanks,
Kenny

ahhh this was a dumb question… I just created a shell script with those command and called it in the post restore field in the backup module. Works great, thank you Lorne!

Hi everyone, needing to reopen this…

The post backup script I have defined in “Post-Restore Hook” on the warm spare to remove the custom call recordings directory used by the primary server is below:

fwconsole setting MIXMON_DIR /tmp
fwconsole setting -r -q MIXMON_DIR

If I run this script manually from the CLI, I can goto advanced settings on the warm spare and the “change call recording location” field is empty as it should be, so it appears the script works.

However when the backup/restore actually runs on the warm spare, if I goto advanced settings, the custom call recordings location from the primary server is still there.

Can someone help me understand why when I run the script manually it works fine, but it doesn’t work when the actual backup/restore operation takes place.

On the warm spare, the Post-Restore Hook field is as follows: /scripts/recordinglocation.sh

I’ve been trying to figure this out all week and I’m stumped, I’d appreciate the assistance!

Nevermind… adding a sudo -i into the script resolved the issue. Oops.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.