One of the most important tasks of a network administrator is to backup the network configuration files of every Cisco device periodically. This periodicity is dictated and established by the organization policies. Frequency could be every week, every fifteen days or every month depending on the needs of the organization.
The importance of the configuration files of the network can be seen from many administrative perspectives:. Now, imagine a network with five devices, a backup in this scenario is very simple for a network administrator. Since only five devices reside in the network, you could access via console, telnet or ssh into the router and save the configuration in a TFTP server executing the following command on every device:.
But what if you have fifty or even one hundred devices? In this type of scenario it is hard to manually perform backups. For this type of situation, you have a variety of external options available third party applications , but one that is often overlooked by some network administrators that is part of the feature set of your Cisco device is the Cisco IOS Auto Archive Feature. The configuration is straightforward. Enter configuration commands, one per line. These are the necessary commands in order to configure a basic Archive.
If the TFTP is operational, it should produce the following output. Now we can go to the TFTP directory in order to validate if the configuration was successfully sent. And we see how the configuration file is stored as "-1", this is because, by default, the Archive feature saves the configuration in increments of one. We can see this if we perform another manual configuration, save and execute the "show archive" command. The next archive file will be named.
We see that in the history of the router, the archive tells us that configuration was sent to the TFTP with the name "-2" and is the most recent. In this output you can note that Archive can only maintain a maximum registry of 15 configuration files inside the router. For administration purposes, the default naming convention is not very filexible, because it is not telling us anything about the device itself. If we want to rapidly identify a device in the directory, we can use the hostname of the device itself.
Note that in this case, if the hostname of the device changes in the future to, let's say, R2 the archive configuration will still send the configuration file with the name set to "R1". For this purporses we have the second mentioned option. If we manually save the configuration and then execute the "show archive" command we can see the results of the configuration. We can visualize that the most recent configuration file sent is named as "R" which has the index set to 1.
At this point, it is very easy for an administrator to manually backup the configuration files of the devices in the network, but the problem partially persists, because this is a manual process. If we want to sort of "overcome" this we can enable the "write-memory" command inside the Archive configuration mode. This allows the router to automagically perform the backup instead of manually saving the configuration.
We could also configure a time variable in the naming convention of the archive configuration. Cisco Community. Join us in congratulating October's Spotlight Award Winners! Turn on suggestions. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for. Search instead for. Did you mean:. All Community This category This board. Ultimately, it failed every time. Could not buffer tarfile E9 Image Directory: cx-universalk9-mz.
E9 Image Name: cx-universalk9-mz. I have this problem too. All forum topics Previous Topic Next Topic. Include the username in the archive download-sw or archive upload-sw privileged EXEC command if you want to specify a username only for that operation.
If the server has a directory structure, the image file is written to or copied from the directory associated with the username on the server. For example, if the image file resides in the home directory of a user on the server, specify that user's name as the remote username. Before you begin downloading or uploading an image file by using FTP, do these tasks:. You can download a new image file and overwrite the current image or keep the current image.
To keep the current image, go to Step 7. Download the image file from the FTP server to the switch, and overwrite the current image. Download the image file from the FTP server to the switch, and keep the current image. The algorithm installs the downloaded image onto the system board flash device flash:.
For file-url , enter the directory name of the old software image. You can upload an image from the switch to an FTP server. You can later download this image to the same switch or to another switch of the same type.
Upload the currently running switch image to the FTP server. The archive upload-sw command builds an image file on the server by uploading these files in order: info, the Cisco IOS image, and the web management files.
You can use this uploaded image for future downloads to the same switch or another of the same type. RCP provides another method of downloading and uploading image files between remote hosts and the switch.
For the RCP copy request to execute successfully, an account must be defined on the network server for the remote username. If the server has a directory structure, the image file is written to or copied from the directory associated with the remote username on the server. Before you begin downloading or uploading an image file by using RCP, do these tasks:. For example, suppose the switch contains these configuration lines:.
You can download a new image file and replace or keep the current image. To keep the current image, go to Step 6. Download the image file from the RCP server to the switch, and overwrite the current image.
Download the image file from the RCP server to the switch, and keep the current image. If there is not enough room to install the new image an keep the running image, the download process stops, and an error message is displayed. You can upload an image from the switch to an RCP server. The upload feature should be used only if the web management pages associated with the embedded device manager have been installed with the existing image.
Upload the currently running switch image to the RCP server. For switch stacks, the archive download-sw and archive upload-sw privileged EXEC commands can be used only through the stack master. To upgrade a switch that has an incompatible software image, use the archive copy-sw privileged EXEC command to copy the software image from an existing stack member to the one that has incompatible software.
Note To successfully use the archive copy-sw privileged EXEC command, you must have downloaded from a TFTP server the images for both the stack member switch being added and the stack master. You use the archive download-sw privileged EXEC command to perform the download. Beginning in privileged EXEC mode from the stack member that you want to upgrade, follow these steps to copy the running image file from the flash memory of a different stack member:. Copy the running image file from a stack member, and then unconditionally reload the updated stack member.
Note At least one stack member must be running the image that is to be copied to the switch that is running the incompatible software. If you do not specify this stack member number, the default is to copy the running image file to all stack members. For source-stack-member-number , specify the number of the stack member the source from which to copy the running image file. The stack member number range is 1 to 9. Reset the updated stack member, and put this configuration change into effect.
Skip to content Skip to search Skip to footer. Book Contents Book Contents. Find Matches in This Book. PDF - Complete Book Updated: July 10, Working with the Flash File System The flash file system is a single flash device on which you can store files. Switch show file systems. Size b Free b Type Flags Prefixes. Table show file systems Field Descriptions Field.
Setting the Default File System You can specify the file system or directory that the system uses as the default file system by using the cd filesystem: privileged EXEC command. Displaying Information about Files on a File System You can view a list of the contents of a file system before manipulating its contents.
Changing Directories and Displaying the Working Directory Beginning in privileged EXEC mode, follow these steps to change directories and display the working directory.
Caution When files and directories are deleted, their contents cannot be recovered. Copying Files To copy a file from a source to a destination, use the copy source-url destination-url privileged EXEC command. Deleting Files When you no longer need a file on a flash memory device, you can permanently delete it.
Caution When files are deleted, their contents cannot be recovered. Switch delete myconfig. Creating, Displaying, and Extracting tar Files You can create a tar file and write files into it, list the files in a tar file, and extract the files from a tar file as described in the next sections. Working with Configuration Files This section describes how to create, load, and maintain configuration files. Guidelines for Creating and Using Configuration Files Creating configuration files can aid in your switch configuration.
Use these guidelines when creating a configuration file: We recommend that you connect through the console port for the initial configuration of the switch. If you are accessing the switch through a network connection instead of through a direct connection to the console port, keep in mind that some configuration changes such as changing the switch IP address or disabling ports can cause a loss of connectivity to the switch.
If no password has been set on the switch, we recommend that you set one by using the enable secret secret-password global configuration command. Configuration File Types and Location n Startup configuration files are used during system startup to configure the software. Creating a Configuration File By Using a Text Editor When creating a configuration file, you must list commands logically so that the system can respond appropriately.
This is one method of creating a configuration file: Step 1 Copy an existing configuration from a switch to a server. Configure using tokyo-confg from Booting tokyo-confg from Write file tokyo-confg on host When you copy a configuration file from the switch to a server by using FTP, the Cisco IOS software sends the first valid username in this list: The username specified in the copy command if a username is specified. The username set by the ip ftp username username global configuration command if the command is configured.
The switch sends the first valid password in this list: The password specified in the copy command if a password is specified. The password set by the ip ftp password password global configuration command if the command is configured. The switch forms a password named username switchname. The variable username is the username associated with the current session, switchname is the configured hostname, and domain is the domain of the switch.
The switch and the FTP server must be in the same subnetwork if you do not have a router to route traffic between subnets. Check connectivity to the FTP server by using the ping command. If you are accessing the switch through the console or a Telnet session and you do not have a valid username, make sure that the current FTP username is the one that you want to use for the FTP download. You can enter the show users privileged EXEC command to view the valid username.
If you do not want to use this username, create a new FTP username by using the ip ftp username username global configuration command during all copy operations. If you are accessing the switch through a Telnet session and you have a valid username, this username is used, and you do not need to set the FTP username. Include the username in the copy command if you want to specify a username for only that copy operation. When you upload a configuration file to the FTP server, it must be properly configured to accept the write request from the user on the switch.
Configure using host1-confg from Loading byte file host1-confg:! Switch configure terminal. Switch config ip ftp username netadmin1. Switch config ip ftp password mypass. Switch config end. Switch copy ftp: nvram:startup-config. Address of remote host [ Name of configuration file[rtr2-confg]? Configure using host2-confg from Loading byte file host2-confg:!
Write file switch2-confg on host Switch config ip ftp username netadmin2. Switch copy nvram:startup-config ftp:. Remote host[]? Name of configuration file to write [switch2-confg]? When you copy a configuration file from the switch to a server, the Cisco IOS software sends the first valid username in this list: The username specified in the copy command if a username is specified. The username set by the ip rcmd remote-username username global configuration command if the command is configured.
The remote username associated with the current TTY terminal process. For example, if the user is connected to the router through Telnet and was authenticated through the username command, the switch software sends the Telnet username as the remote username. The switch hostname. Ensure that the switch has a route to the RCP server. The switch and the server must be in the same subnetwork if you do not have a router to route traffic between subnets.
Check connectivity to the RCP server by using the ping command. If you are accessing the switch through the console or a Telnet session and you do not have a valid username, make sure that the current RCP username is the one that you want to use for the RCP download. For switch stacks, the archive download-sw and archive upload-sw privileged EXEC commands can only be used through the stack master.
Software images downloaded to the stack master are automatically downloaded to the rest of the stack members. Before you begin downloading or uploading an image file by using TFTP, do these tasks:. To restart the daemon, either stop the inetd process and restart it, or enter a fastboot command on the SunOS 4. For more information on the TFTP daemon, see the documentation for your workstation. You can download a new image file and replace the current image or keep the current image.
To keep the current image, follow Step 2. Optional Downloads the image files from the TFTP server to the switch, and overwrites the current image.
The download algorithm verifies that the image is appropriate for the switch model and that enough DRAM is present, or it aborts the process and reports an error. If there is not enough space to install the new image and keep the current running image, the download process stops, and an error message is displayed. The algorithm installs the downloaded image on the system board flash device flash:. The image is placed into a new directory named with the software version string, and the BOOT environment variable is updated to point to the newly installed image.
For filesystem , use flash: for the system board flash device. For file-url , enter the directory name of the old image. All the files in the directory and the directory are removed.
You can upload an image from the switch to a TFTP server. You can later download this image to the switch or to another switch of the same type. Use the upload feature only if the web management pages associated with Device Manager have been installed with the existing image. Uploads the currently running switch image to the TFTP server. The archive upload-sw privileged EXEC command builds an image file on the server by uploading these files in order: info, the Cisco IOS image, and the web management files.
After these files are uploaded, the upload algorithm creates the file format. You upload a switch image file to a server for backup purposes. You can use this uploaded image for future downloads to the switch or another switch of the same type.
You can copy images files to or from an FTP server. When you copy an image file from the switch to a server by using FTP, the Cisco IOS software sends the first valid username in this list:. The switch sends the first valid password in this list:. The username and password must be associated with an account on the FTP server.
If you are writing to the server, the FTP server must be properly configured to accept the FTP write request from you. Use the ip ftp username and ip ftp password commands to specify a username and password for all copies. Include the username in the archive download-sw or archive upload-sw privileged EXEC command if you want to specify a username only for that operation. If the server has a directory structure, the image file is written to or copied from the directory associated with the username on the server.
For example, if the image file resides in the home directory of a user on the server, specify that user's name as the remote username. Before you begin downloading or uploading an image file by using FTP, complete these tasks:. For more information, see the documentation for your FTP server. You can download a new image file and overwrite the current image or keep the current image. To keep the current image, follow Steps 1 to 6 and Step 8.
Optional Enters global configuration mode on the switch.
0コメント