Failover LANtoLAN script Linux

Status
Not open for further replies.

Riccardo M.

Silver Partner
Basic Certified
Joined
May 21, 2020
Messages
42
Reaction score
7
Hi,

I've to add a second 3CX (Linux Debian) server on our network that has to work as Passive. I don't know how to proceed with the configure of the scripts to insert here:

1604595646121.png

the Backup/Restore are already configured..... otherwise I've run that commands on Passive:

root@lab-pbx01:~#: ssh-keygen -t rsa
root@lab-pbx01:~#: cat.ssh/id_rsa.pub | ssh root@XX.XX.XX.XX "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"


someone can help me? thanks
 
Last edited:
Hi,

I've to add a second 3CX (Linux Debian) server on our network that has to work as Passive. I don't know how to proceed with the configure of the scripts to insert here:

View attachment 18985

the Backup/Restore are already configured..... otherwise I've run that commands on Passive:

root@lab-pbx01:~#: ssh-keygen -t rsa
root@lab-pbx01:~#: cat.ssh/id_rsa.pub | ssh root@XX.XX.XX.XX "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys"


someone can help me? thanks
It would be best to use internal DNS and use a script to update the DNS to the IP of the passive server upon no response from the primary server.
 
It would be best to use internal DNS and use a script to update the DNS to the IP of the passive server upon no response from the primary server.
we have as internal DNS a W2019... so the steps to run should be:
  1. stop the services on Active:
    1. sudo /usr/sbin/3CXStopServices
      sudo ip l s eth1 down
  2. run the script to update DNS record
    1. ????
or create a script to change the IP address on Passive ????
 
It would be best to use internal DNS and use a script to update the DNS to the IP of the passive server upon no response from the primary server.

we have as internal DNS a W2019... so the steps to run should be:
  1. stop the services on Active:
    1. sudo /usr/sbin/3CXStopServices
      sudo ip link set ens92 down
  2. run the script to update DNS record on windows
    1. ????
or create a script to change the IP address on Passive and put that in up????
  1. change the IP address
    1. sudo ip a add 192.168.1.200/24 dev ens92
    2. sudo ip link set ens92 up
 
It would be best to use internal DNS and use a script to update the DNS to the IP of the passive server upon no response from the primary server.


Hi,

is it correct to use only the script /usr/sbin/3CXStopServices to stop all services of 3CX or I've to consider someone else??

1604913028979.png

the script to use is right in this way?

#!/bin/bash
ssh -t 10.20.74.26 /usr/sbin/3CXStopServices
ssh -t 10.20.74.26 ifconfig ens192 down
ifconfig 10.20.74.26/24 dev ens192 up


last question :-) is better to add that before or after to start the services? thanks a lot. Sorry but for the failover LANtoLAN I've found few posts.
 

Attachments

  • 1604913104299.png
    1604913104299.png
    43 KB · Views: 20
Status
Not open for further replies.

Forum statistics

Threads
111,990
Messages
590,165
Members
164,929
Latest member
Cloudstar