Cisco Cisco Email Security Appliance X1050 Troubleshooting Guide

Page of 4
How Can I Automate or Script Configuration File
Backups?
Document ID: 118372
Contributed by Andrew Wurster and Robert Sherwin, Cisco TAC
Engineers.
Sep 04, 2014
Contents
Introduction
Prerequisites
     Requirements
How Can I Automate or Script Configuration File Backups?
Saving the Configuration to a Specified Host Using saveconfig
Emailing the Configuration to an Email Address Using mailconfig
Schedule Your Task to Run on a Regular Basis (UNIX/Linux)
How Can I Automate or Script Configuration File Backups from a Windows System?
Schedule Your Task to Run on a Regular Basis (Windows)
Related Information
Introduction
This document describes basic concepts and understanding associated with creating scripts for an external
host to perform and retreive updates against a Cisco Email Security Appliance (ESA).
Note: This article is a proof−of−concept and provided as an example basis. While these steps have been
successfully tested, this article is primarily for demonstration and illustration purposes. Custom scripts are
outside of the scope and supportability of Cisco. Cisco Technical Assistance will not write, update, or
troubleshoot custom external scripts at any time.
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
OS scripting and task scheduling
• 
SSH keypair configuration and procedures
• 
How Can I Automate or Script Configuration File Backups?
The configuration file is dynamically generated when using the saveconfig or mailconfig from the CLI, or the
associated backup options through the GUI (System Administration > Configuration File). To have an
effective backup that is able to be loaded and applied to an ESA, it is best to "unmask" the passwords. This
allows the appliance to place a hashed form of the passwords for the local administrative accounts in the
configuration file. For this reason, we can not simply copy a flat "running configuration" file from the device.
This method allows us to first access the appliance, issue a command to dynamically build the current
configuration, and either save or mail a copy of this file somewhere remotely, without any user intervention.