UPDATE
See new post here – https://ucgeek.co/2020/07/automate-ribbon-sbc1000-sbc2000-backups/
Using PowerShell 3.0+ you can backup the Sonus 1k/2k SBC’s using the REST API.
Firstly you will need to create a rest user on the SBC:
Then simply run the following script in Powershell, or setup a scheduled task to automate the process:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
#Variables $Address = "10.1.1.1" $Username = "rest" $Password = "Remote2015!" $BackupPath = "C:" + (Get-Date).ToString("yyyy.mm.dd-hh.mm.ss") +".tar" #Authenticate to SBC [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} $LoginUrl = "https://" + $Address + "/rest/login" $LoginCredentials = "Username=" + $Username + "&Password=" + $Password Invoke-RestMethod -Uri $LoginUrl -Method Post -Body $LoginCredentials -SessionVariable ps #Backup Gateways $args = "" $BackupUrl = "https://" + $Address + "/rest/system?action=backup" Invoke-RestMethod -Uri $BackupUrl -Method POST -Body $args -WebSession $ps -OutFile $BackupPath |
Hi Andrew,
Thanks for this, however when i tried to run my script it looks like it’s just backing up the webpage and not the gateway’s files because the usual size of the gateway backup is 200 kb but the result of my script is only 13 KB.
Try my updated script here – https://ucgeek.co/2020/07/automate-ribbon-sbc1000-sbc2000-backups/. There are some TLS settings commented out that you may want to try if it doesn’t work. Let me know how you get on.