41-11
Cisco Security Appliance Command Line Configuration Guide
OL-12172-03
Chapter 41 Managing Software, Licenses, and Configurations
Backing Up Configuration Files
Running the Script
To run a backup and restore script, follow these steps:
Step 1
Download or cut and paste the script file to any location on your system.
Step 2
At the command line, enter
Perl
scriptname
, where
scriptname
is the name of the script file.
Step 3
Press
Enter
.
Step 4
The system prompts you for values for each of the options. Alternatively, you can enter values for the
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.
Step 5
The script starts running, printing out the commands that it issues, which provides you with a record of
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
# 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.
#Requirements: Perl with Expect, SSH to the ASA, and a TFTP server.
#Usage: backupasa -option option_value
# -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.
#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
Содержание 500 Series
Страница 38: ...Contents xxxviii Cisco Security Appliance Command Line Configuration Guide OL 12172 03 ...
Страница 45: ...P A R T 1 Getting Started and General Information ...
Страница 46: ......
Страница 277: ...P A R T 2 Configuring the Firewall ...
Страница 278: ......
Страница 354: ...17 38 Cisco Security Appliance Command Line Configuration Guide OL 12172 03 Chapter 17 Configuring NAT NAT Examples ...
Страница 561: ...P A R T 3 Configuring VPN ...
Страница 562: ......
Страница 891: ...P A R T 4 System Administration ...
Страница 892: ......
Страница 975: ...P A R T 5 Reference ...
Страница 976: ......