main aim is using internal features of freepbx to make sync between two PBXs. Automatic sync will be made by back&restore feature in FREEPBX.
STEP: 1. add asterisk public key from master FREEPBX to backup server. master public key for asterisk user you can find in menu “Backup&Restore -> Global Setting”
Copy this key to /home/asterisk/.ssh/authorized_keys at Backup machine.
STEP: 2. Add new filestore with SSH connect to backup server
STEP: 3. example of ssh parameters for ssh connect
STEP 4: create new backup in menu “Backup&Restore”. use any modules you need and set crontime you wish. for example i will be use one time per day. Better you set “Delete After Runs” 1 so only 1 file will be in backup server.
Now run it and check if new file with backup created in /home/asterisk dir at backup server.
STEP5: add cronjob at backup: something like that: crontab -u asterisk -e
0 1 * * * fwconsole backup –restore /home/asterisk/*.tar.gz