Backing up configuration files

Before and after you upgrade your switch software, make copies of the configuration files. If an error occurs, use backup configuration files to return the switch to a previous state.

Before you begin

  • If you use File Transfer Protocol (FTP) or Trivial File Transfer Protocol (TFTP), ensure that you enable the FTP or TFTP server. File Transfer Protocol (FTP) and Trivial File Transfer Protocol (TFTP) support both IPv4 and IPv6 addresses, with no difference in functionality or configuration.

About this task

Keep several copies of backup files.

Procedure

  1. Enter Privileged EXEC mode:

    enable

  2. Determine the configuration file names:

    show boot config choice

  3. Save the configuration files. Assuming the files use the default file names, enter:

    save config

  4. Copy the files to a safe place:

    copy /intflash/config.cfg /intflash/config_backup.cfg

    copy /intflash/config.cfg a.b.c.d:/dir/config_backup.cfg

Example

Determine the configuration file names, save the configuration files, and copy the files to a safe place.

Switch:1>enable
Switch:1#show boot config choice
choice primary config-file "/intflash/config.cfg"
choice primary backup-config-file "/intflash/config.cfg"
Switch:1#save config
Switch:1#copy /intflash/config.cfg 00:11:f9:5b:10:42/dir/config_backup.cfg
Do you want to continue? (y/n)
y