Automate Cisco Video Communication Server configuration backups

By just Another Techy / On / In Cisco

Last time I covered the TelePresence MCU backups crazyhorse made a great point that there isn’t a standard automated backup solution for the VCS configuration from Cisco, in this post I’ll walk you through setting up a simple shell script and CRON job to automate this.


Login to your Cisco Video Communications Server and add a user account for your backup script, the account only needs Read-only API access as per the screenshot below

Cisco VCS Backup

Step TWO: Scripting

On your linux server create a new file, make sure this file is outside of the directory you plan to store your backups


Change the permissions on the file so you can execute it

chmod a+x

Now open the file in your favourite editor (I use nano) and insert the content below, you will need to change the following fields to suit your environment



USERNAME="backup"				                # vcs username
PASSWORD="password"		                        # vcs password
VCSHOST=""		                # vcs hostname or ip
USEHTTPS=Yes					                # use https?
CONFFILE="configuration.xml"			        # configuration filename
CONFNOW=$(date +"%d%m%Y")_configuration.xml	    # prefix saved file with current date
BACKUPDIR="/home/vcs_backup/vcs_hostname" 	    # backup directory to store configuration file
DAYSTORETAIN=14					                # keep two weeks of backups

# login to remote server
if [ $USEHTTPS == Yes ]; then
        wget https://$VCSHOST/$CONFFILE --no-check-certificate --user=$USERNAME --password=$PASSWORD > /dev/null 2>&1
        wget http://$VCSHOST/$CONFFILE --user=$USERNAME --password=$PASSWORD > /dev/null 2>&1

# move files
tar -zcvf $CONFNOW.tar.gz $CONFNOW
rm -f $CONFNOW

# purge old backups
find $BACKUPDIR -maxdepth 1 -type f -mtime +$DAYSTORETAIN -delete

You can then manually test the script (./ and list the directory (ls -al) to ensure the configuration.xml has been compressed into a tar.gz file and is prefixed with the current date.

[root@linux]# ./
[root@linux]# ls -al
total 388
drwxr-xr-x. 2 root root   4096 Apr  8 10:49 .
drwxr-xr-x. 4 root root   4096 Feb  6 11:33 ..
-rw-r--r--. 1 root root  19248 Apr  8 10:49 08042013_configuration.xml.tar.gz
-rwxr-xr-x. 1 root root    743 Apr  8 10:49


CRON is a task scheduler for Linux. I won’t be covering it in-depth here, but I’ll give you what you need to run your backup script every week. To add a task to the CRON scheduler, you simply add a line to the “crontab”. Edit this by typing:

crontab -e
env EDITOR=nano crontab -e

This will open up the CRON file in your text editor, if you’ve never added anything before, it’s also likely to be blank. No worries. Add these lines:
00 4 * * 0 /home/vcs_backup/

The format this command follows is pretty simple:
*    *    *    *    *  command to be executed
_    _    _    _    _
|    |    |    |    |
|    |    |    |    |
|    |    |    |    ------ day of week (0 - 7) (0 or 7 are Sunday, or use names)
|    |    |    ----------- month (1 - 12)
|    |    ---------------- day of month (1 - 31)
|    --------------------- hour (0 - 23)
-------------------------- min (0 - 59)

A * in the pattern ignores that item. So in the example above, we are going to run our backup script at 00 minutes 4 hours, every 0 (Sunday) of the week.

  • crazyhorse

    Excellent stuff! Thank you, Daz.

  • crazyhorse

    Hi Daz, what rev is the VCS on? X7.2? Thanks.

    • darrengoulden

      x7.2.1 bud

  • Rachid

    Hmm, but how to restore a VCS with the downloaded configuration.xml?
    You can’t upload it anywhere in the web interface and it’s not the format as the xConfiguration tshell command.

  • Claus Pedersen

    Very nice. Has anyone done a Windows version of this backup routine. Maybe in Powershell or the likes ?

    • Claus Pedersen

      Have you tried restoring using your configuration file ?