Backup script for Cisco meeting Server (former Acano)
If you want to run a scheduled backup of your CMS servers I made a short script for this.
This is run as a batch-file in a scheduled task in windows.
Prerequisites:
Putty installed on a Windows server that can reach the CMS servers admin interface.
WinSCP installed on a Windows server that can reach the CMS servers admin interface.
These are the lines from the batch file i run as a schedule:
"C:\Program Files (x86)\PuTTY\putty.exe" -ssh user@core1 -pw adminpassword -m C:\localpath\Backup\Script\command_DC1.txt
"C:\Program Files (x86)\PuTTY\putty.exe" -ssh user@core2 -pw adminpassword -m C:\localpath\Backup\Script\command_DC2.txt
"C:\Program Files (x86)\PuTTY\putty.exe" -ssh user@dbserver -pw adminpassword -m C:\localpath\Backup\Script\command_DB.txt
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\localpath\Backup\Script\ftp_command_DC1.txt"
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\localpath\Backup\Script\ftp_command_DC2.txt"
"C:\Program Files (x86)\WinSCP\WinSCP.com" /script="C:\localpath\Backup\Script\ftp_command_DB.txt
These three first lines run the "backup snapshot" command via ssh.
Note that it refers to a dedicated command script.
The next three lines downloads the backup-file to the location specified in the command script.
Note that it refers to a dedicated command script.
The command_dc1.txt contains only one line:
backup snapshot Backup_DC1
This will create a backup file called backup_dc1.bak on the cms server
The ftp_command_dc1.txt file contain these lines:
# Connect
open sftp://username:passowrd@serverIP/ -hostkey="ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"
# Change remote directory
#cd /
# Force binary mode transfer
option transfer binary
# Download file to the local directory d:\
get Backup_DC1.bak C:\localpath\Backup\Backup_DB_%TIMESTAMP#yyyymmddhhnnss%.bak
# Disconnect
close
# Exit WinSCP
exit
The hostkey can be found if you connect to the cms servers and choose session from the menu.
The pick server protocol information.
This will download the backup file locally and add a timestamp to the filename.
Create similar command files for each server you want run backup from.
Create a scheduled task in windows and trigger it as often you prefer.
And thats it folks.
Comments
Post a Comment