We are finally upgrading our clients who have Warm Spare servers to FreePBX 15.
First I was kinda happy to discover now rather than in a disaster recovery situation that DynRoutes are not included in backups.
Second, in FreePBX 14 we were using the pre and post restore hooks. Is there a way to do the same in 15+?
Third, we usually ran the restore manually every here and there (in addition to the automated nightly restore) to see if any errors occur and make sure things are working smooth. But in FreePBX 15:
- When running it manually, there’s no indication on the warm spare to tell me when it’s done.
- Is there any logs I can review on the warm spare to ensure that everything restored correctly?
Finally, if someone can please explain what was wrong with the old method so it was necessary to do it the new way.
I am thinking if I should perhaps do the warm spare setup like this: (I did not test this)
- Create a backup on the Primary Server with all the data you want on the Warm Spare (exclude NAT, backup etc) and enable ‘Append Backup Name as a directory to the Storage path’. Copy the fwconsole backup ID.
- Setup SSH keys so the Warm Spare can access the Primary Server
- Run a bash script on the secondary:
#!/bin/bash #Pre hooks #/path/to/script #Start the backup on the remote server ssh -i /home/asterisk/.ssh/id_rsa [email protected] "fwconsole bu --backup 2327d0f8-5ca4-4f94-ba89-e07fdb974559" #Copy the backup file from the Primary to the Warm Spare scp -i /home/asterisk/.ssh/id_rsa [email protected] :/var/spool/asterisk/backup/Backup-Name* /var/spool/asterisk/backup/Backup-Name #Get the backup file name backupfile=$(ls /var/spool/asterisk/backup/Backup-Name/) #Run the restore /usr/sbin/fwconsole backup --restore /var/spool/asterisk/backup/Backup-Name/$backupfile #Set permissions and reload /usr/sbin/fwconsole chown /usr/sbin/fwconsole reload #Remove the files from both servers rm -f /var/spool/asterisk/backup/Backup-Name/$backupfile ssh -i /home/asterisk/.ssh/id_rsa [email protected] "rm -f /var/spool/asterisk/backup/Backup-Name/$backupfile" #Post hooks #/path/to/script
Now there’s no need to add an API keys to the primary server etc.