Running The Script; Sample Script - Cisco PIX 500 Series Configuration Manual

Security appliance command line
Hide thumbs Also See for PIX 500 Series:
Table of Contents

Advertisement

Chapter 41
Managing Software, Licenses, and Configurations

Running the Script

To run a backup and restore script, follow these steps:
Download or cut and paste the script file to any location on your system.
Step 1
At the command line, enter Perl scriptname, where scriptname is the name of the script file.
Step 2
Press Enter.
Step 3
The system prompts you for values for each of the options. Alternatively, you can enter values for the
Step 4
options when you enter the Perl scriptname command before you press Enter. Either way, the script
requires that you enter a value for each option.
The script starts running, printing out the commands that it issues, which provides you with a record of
Step 5
the CLIs. You can use these CLIs for a later restore, particularly useful if you want to restore only one
or two files.

Sample Script

#!/usr/bin/perl
#Function: Backup/restore configuration/extensions to/from a TFTP server.
#Description: The objective of this script is to show how to back up configurations/extensions
#
#
#
#Requirements: Perl with Expect, SSH to the ASA, and a TFTP server.
#Usage: backupasa -option option_value
#
#
#
#
#
#
#
#If you don't enter an option, the script will prompt for it prior to backup.
#
#Make sure that you can SSH to the ASA.
use Expect;
use Getopt::Std;
#global variables
OL-12172-03
before the backup/restore command is developed.
It currently backs up the running configuration, all extensions imported via "import webvpn"
command, the CSD configuration XML file, and the DAP configuration XML file.
-h: ASA hostname or IP address
-u: User name to log in via SSH
-w: Password to log in via SSH
-e: The Enable password on the security appliance
-p: Global configuration mode prompt
-s: Host name or IP address of the TFTP server to store the configurations
-r: Restore with an argument that specifies the the file name. This file is produced during backup.
Cisco Security Appliance Command Line Configuration Guide
Backing Up Configuration Files
41-11

Advertisement

Table of Contents
loading

This manual is also suitable for:

Asa 5500 series

Table of Contents