backup
To back up an ASA configuration, certificates, keys, and images, use the backup command in privileged EXEC mode.
backup [ /noconfirm ] [ context ctx-name ] [ interface name ] [ passphrase value ] [ location path ]
Syntax Description
/noconfirm |
Specifies not to prompt for the location and cert-passphrase parameters. Allows you to bypass warning and error messages to continue the backup. |
context ctx-name |
In multiple context mode from the system execution space, enter the context keyword to backup the specified context. Each context must be backed up individually; that is, re-enter the backup command for each file. |
interface name |
(Optional) Specifies the interface name through which the backup will be copied. If you do not specify the interface, the ASA checks the management-only routing table; if there are no matches, it then checks the data routing table. |
location path |
The backup location can be a local disk or a remote URL. If you do not provide a location, the following default names are used:
|
passphrase value |
During the backup of VPN certificates and preshared keys, a secret key identified by the cert-passphrase keyword is required to encode the certificates. You must provide a passphrase to be used for encoding and decoding the certificates in PKCS12 format. The backup only includes RSA key pairs tied to the certificates and excludes any standalone certificates. |
Command Default
If you do not provide a location, the following default names are used:
-
Single mode—disk0:hostname .backup.timestamp .tar.gz
-
Multiple mode—disk0:hostname .context-ctx-name .backup.timestamp .tar.gz
Command Modes
The following table shows the modes in which you can enter the command:
Command Mode |
Firewall Mode |
Security Context |
|||
---|---|---|---|---|---|
Routed |
Transparent |
Single |
Multiple |
||
Context |
System |
||||
Privileged EXEC |
|
|
|
|
|
Command History
Release |
Modification |
---|---|
9.3(2) |
This command was added. |
9.5(1) |
The interface name argument was added. |
Usage Guidelines
See the following guidelines:
-
You should have at least 300 MB of disk space available at the backup location before you start a backup.
-
If you make any configuration changes during or after a backup, those changes will not be included in the backup. If you change a configuration after making the backup, then perform a restore, this configuration change will be overwritten. As a result, the ASA might behave differently.
-
You can start only one backup at a time.
-
You can only restore a configuration to the same ASA version as when you performed the original backup. You cannot use the restore tool to migrate a configuration from one ASA version to another. If a configuration migration is required, the ASA automatically upgrades the resident startup configuration when it loads the new ASA OS.
-
If you use clustering, you can only back up the startup-configuration, running-configuration, and identity certificates. You must create and restore a backup separately for each unit.
-
If you use failover, you must create and restore a backup separately for the active and standby units.
-
If you set a master passphrase for the ASA, then you need that master passphrase to restore the backup configuration that you create with this procedure. If you do not know the master passphrase for the ASA, see the CLI configuration guide to learn how to reset it before continuing with the backup.
-
If you import PKCS12 data (with the crypto ca trustpoint command) and the trustpoint uses RSA keys, the imported key pair is assigned the same name as the trustpoint. Because of this limitation, if you specify a different name for the trustpoint and its key pair after you have restored an ASDM configuration, the startup configuration will be the same as the original configuration, but the running configuration will include a different key pair name. This means that if you use different names for the key pair and trustpoint, you cannot restore the original configuration. To work around this issue, make sure that you use the same name for the trustpoint and its key pair.
-
If you do not specify the interface, the ASA checks the management-only routing table; if there are no matches, it then checks the data routing table. Note that if you have a default route through a management-only interface, all backup traffic will match that route and never check the data routing table. In this scenario, always specify the interface if you need to back up through a data interface.
-
You cannot back up using the CLI and restore using ASDM, or vice versa.
-
When backup location command is issued, ensure to use double slash ‘//’ for the directory path. For example,
ciscoasa# backup location disk0://sample-backup
-
Each backup file includes the following content:
-
Running-configuration
-
Startup-configuration
-
All security images
-
Cisco Secure Desktop and Host Scan images
Cisco Secure Desktop and Host Scan settings
AnyConnect (SVC) client images and profiles
AnyConnect (SVC) customizations and transforms
-
-
Identity certificates (includes RSA key pairs tied to identity certificates; excludes standalone keys)
-
VPN pre-shared keys
-
SSL VPN configurations
-
Application Profile Custom Framework (APCF)
-
Bookmarks
-
Customizations
-
Dynamic Access Policy (DAP)
-
Plug-ins
-
Pre-fill scripts for connection profiles
-
Proxy Auto-config
-
Translation table
-
Web content
-
Version information
-
Examples
The following example shows how to create a backup:
ciscoasa# backup location disk0://sample-backup
Backup location [disk0://sample-backup]?
Begin backup...
Backing up [ASA version] ... Done!
Backing up [Running Config] ... Done!
Backing up [Startup Config] ... Done!
Enter a passphrase to encrypt identity certificates. The default is cisco. You will be required to enter the same passphrase while doing a restore: cisco
Backing up [Identity Certificates] ... Done!
IMPORTANT: This device uses master passphrase encryption. If this backup file is used to restore to a device with a different master passphrase, you will need to provide the current master passphrase during restore.
Backing up [VPN Pre-shared keys] ... Done!
Backing up [SSL VPN Configurations: Application Profile Custom Framework] ... Done!
Backing up [SSL VPN Configurations: Bookmarks]... Done!
Backing up [SSL VPN Configurations: Customization] ... Done!
Backing up [SSL VPN Configurations: Dynamic Access Policy] ... Done!
Backing up [SSL VPN Configurations: Plug-in] ... Done!
Backing up [SSL VPN Configurations: Pre-fill scripts for Connection Profile] ... Done!
Backing up [SSL VPN Configurations: Proxy auto-config] ... Done!
Backing up [SSL VPN Configurations: Translation table] ... Done!
Backing up [SSL VPN Configurations: Web Content] ... Done!
Backing up [Anyconnect(SVC) client images and profiles] ... Done!
Backing up [Anyconnect(SVC) customizations and transforms] ... Done!
Backing up [Cisco Secure Desktop and Host Scan images] ... Done!
Backing up [UC-IME tickets] ... Done!
Compressing the backup directory ... Done!
Copying Backup ... Done!
Cleaning up ... Done!
Backup finished!