cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1134
Views
5
Helpful
6
Replies

[VCS] Automatic backup config

Hello,

I'm wondering if there is any solution to make an automatic back-up config file for the VCS C&E.

Please share your knowledge.

Regards,

Firdaush

6 REPLIES 6

This has been asked a few

This has been asked a few times here in the forums:

vcs-automated-backup

scheduled-vcs-config-backups

automated-backup-vcs-configuration

The VCS/Expressway Series doesn't include an type of automatic backup function themselves, currently the only methods of backing up a VCS is manually by one of the these options:

  • VCS using Maintenance > Backup and Restore.
  • TMS using Systems > Configuration Backup 

With that said, someone has managed to do automated backups with the use of scripting, see Automate Cisco Video Communication Server configuration backups.

Contributor

Re: This has been asked a few

Doesn't work.  It's not a valid backup, so you can't restore.  Avoid this - fool's gold.

Re: This has been asked a few

Only really way to full backup a VCS is using it's built-in backup methods available in web interface, which will backup everything.
Contributor

Re: This has been asked a few

I have found a script on the box available as root which allows the tar file to be generated programmatically.  It's under /sbin.  However, you need to ssh using the root account to do this.

Beginner

Re: This has been asked a few

Hello Jonathan, 

You means that you access to the expressway with for example winscp ( root) and you find a file under /sbin that generate an automatic backup ?

Which is the name of this file please ?

 

Kind regards,

Asma

Highlighted
Beginner

Re: This has been asked a few

No fools gold here, this powershell works just fine for us, it will download the files to the directory that the script is run from. 

 

 

# Start Script

 

$header = "computer","user","pass"
# modify the computer and password fields below
$data = @'
expy-c-1,admin,<password>
expy-c-2,admin,<password>
expy-e-1,admin,<password>
expy-e-2,admin,<password>
'@


$CSV = ConvertFrom-CSV -header $header $data


# Trust all certificates, regardless of error types
add-type @"
using System.Net;
using System.Security.Cryptography.X509Certificates;
public class TrustAllCertsPolicy : ICertificatePolicy {
public bool CheckValidationResult(
ServicePoint srvPoint, X509Certificate certificate,
WebRequest request, int certificateProblem) {
return true;
}
}
"@
[System.Net.ServicePointManager]::CertificatePolicy = New-Object TrustAllCertsPolicy
# use TLS to connect
[System.Net.ServicePointManager]::SecurityProtocol = ([enum]::GetNames([System.Net.SecurityProtocolType]) | ? {$_ -match "Tls"})


function Backup-Expressway {
[CmdletBinding()]
Param
(
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=0)]
$computer,
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=1)]
$user,
[Parameter(Mandatory=$true, ValueFromPipelineByPropertyName=$true, Position=2)]
$pass
)

$LoginParams = @{submitbutton='Login';username=$user;password=$pass;formbutton='Login'}
$Login = Invoke-WebRequest "https://$computer/login" -UseBasicParsing -SessionVariable access -Body $LoginParams -Method Post

$BkUp = invoke-webrequest "https://$computer/backuprestore" -websession $access -UseBasicParsing

$BkParams = @{sessionid=$bkup.InputFields.FindById('sessionid').value;submitbutton='Create system backup file';backup_password=''}
$BkupFile = invoke-webrequest "https://$computer/backuprestore" -websession $access -Body $BkParams -Method Post -TimeOutSec 0 -UseBasicParsing

$FileName = [regex]::match($bkupfile.Headers['content-disposition'],'filename=(.*)').groups[1].value
$path = "$pwd\$filename"
[System.IO.File]::WriteAllBytes($path, $BkupFile.content)

}

$CSV | %{Backup-Expressway $_.computer $_.user $_.pass}

 

# End Script

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards