Cisco Router File System
The Cisco IOS File System (IFS) have different directories. The directories available depend on the device. The IFS also allow creating subdirectories in flash memory or on a disk. The figure below display the output of the show file system command, the command lists all of the available file systems on the router.
The command gives helpful information such as the information about available and free memory, the file types, and its permissions. Permissions contain read-only (wr), write-only (ro), and read and write (rw). The asterisk against flash file system means that the current default file system is flash. The pound symbol (#) appended to the flash indicate that bootable IOS is located in flash.
The Flash File System
The figure below displays the output of the dir command. Flash is the default file system, so the dir command lists the contents of flash.
The NVRAM File System
To view and list the contents of NVRAM, the command will be given as dir NVRAM: in user exec mode. as shown in the Figure below.
Switch File Systems
The show file systems command also show the file systems on a Catalyst switch is the same as on a Cisco router, as shown in the figure.
Backup and Restoring using Text files
Backup
Using Tera Term we can also backup Configuration file and restore configuration when needed from the text file. The steps for backup and restoring using Tera Term is the following:-
- On the File menu of Tera Term, click Log.
- Then select the location where you want to save the file. Now Tera Term will start capturing.
- Once the capture has been started, execute the show running-config or show startup-config command at the privileged EXEC prompt. The displayed text in the Tera Terminal will be directed to the chosen file.
- After completing capture, select Close in the Tera Term: Log window.
- View the file at the chosen location to verify that it was not corrupted.
Restoring
When configuration copied from a text file and pasted it into a terminal window, the Inter Operating System executes each line of the text file as a command. So, the captured file will require editing to make sure that encrypted passwords are in plain text and that there is no non-command text.
Furthermore, the device must be set at the global configuration mode to receive the commands from the text file being pasted into the terminal window. Following are the steps to restore configuration using Tera Term.
- On the File menu of Tera Term, click Send File
- Locate the configuration text file to be copied into the device and click Open.
- Tera Term will paste the file into the device and the text will be applied as a command in the device.
Backup and Restoring Configurations with TFTP
Backup
Startup configuration or running configuration files can be stored on a TFTP (Trivial File Transfer Protocol) server and can be restored in the event of the problem. The configuration file should also be included in the network documentation.
To save the running configuration or the startup configuration file to a TFTP (Trivial File Transfer Protocol) server, use the copy running-config tftp or copy startup-config tftp command. Following are the steps to back up the running configuration to a TFTP server:
- Enter the copy running-config tftp command in user exec mode and then enter the hostname or IP address where the configuration file will be stored.
- Enter the name to assign to the configuration file.
- Press Enter to confirm every choice.
The figure below illustrates the backup process to TFTP.
Restoring
To restore the running configuration or the startup configuration from a TFTP (Trivial File Transfer Protocol) server, use copy tftp running-config or copy tftp startup-config command. Following are the steps to restore the running configuration from a TFTP server:
- Enter the copy tftp running-config command in user exec mode and then enter the hostname or IP address where the configuration file is stored.
- Enter the name to assign to the configuration file.
- Press Enter to confirms each choice.
The Figure below illustrates the restore process from the TFTP server.
Backing Up and Restoring Using a USB
Backup
Before backing up to a USB port, it is important to verify that the USB drive is there and confirm the name of the drive using the show file systems command in the user exec mode. If the USB drive is there, use the copy run usbflash0:/ command to copy the configuration file to the USB flash drive. Be sure to use the name of the flash drive exactly, as indicated in the file system.
The slash indicates the root directory of the USB flash drive. Then the IOS will prompt for the filename. If the file already copied and exists on the USB flash drive, the router will then prompt to overwrite. We can see files and directories in the USB using the dir command.
Restore
To copy the file back, use the command copy usbflash0:/Router-Config running-config to restore a running configuration where Router-Config is the backup file name in the USB.