SFTP between two FreePBX 14 servers

I have two FreePBX systems, my main one and a backup one. They are in two different co-locations and I want to backup the primary on the backup server every few days or once a week. I don’t want to use FTP since its clear text and username/password could be derived? Is there SFTP on FreePBX or is there a recommended module to add for SFTP support? In my scenario, I restore the backup, enable the trunks and my backup can become the primary with a DNS change. I would love to have it setup as a hot spare but it looks to me like they need to be in the same location for this to work? (plus High Availability says its not supported in 14 yet)

It’s just a Linux box right? Pick your favorite application, then setup a reoccurring job to backup and upload (main server). Then a job to download and restore (backup server).

Would that work for you?

Does not using ssh in the backup module work for you here? it is pretty well exactly what you ask for.

Why don’t you use warm spare ?

1 Like

I followed the directions to a tee and it worked (kind of)! It successfully connects to the HOT server and does restore the configuration and database to the “warm” server but it does NOT disable the registered trunks (and I do not get any errors). I have two trunks configured and it keeps re-enabling them so both servers are trying to connect to my SIP trunk at the same time. I have to manually disable the trunks after the automatic restore. I double checked and the option “disable registered trunks” is ENABLED (I assume that means, I want it to disable the trunks). If I run the backup/restore process it keeps re-enabling the trunks (the other options appear to work though, its not updating my IP and machine specific IP related items).

FOLLOWUP: I added a post-restore script called /home/asterisk/disable_trunks.sh with the following commands
fwconsole trunks --disable 1
fwconsole trunks --disable 2

this disabled the trunks after the restore completed. and appears to be working although there is about 30 seconds where the trunks are enabled before the post-hooks execute.

1 Like

File a bug report issues.freepbx.org

Also, i hope you excluded backup settings as well.

yes I did, thanks.

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