|
Router Configuration Backup Utility 2 (conf_bkup_show_run) |
Top Previous Next |
|
Router Configuration Backup Utility 2 (conf_bkup_show_run) Unlike the copy_to_tftp script, this script backs up the router configurations by telneting to the router and performing a “show run”. Any extra information from the telnet session is stripped off and the file is then saved to the system where the script is run from. This script is useful when a TFTP server is not available or the router cannot reach the TFTP server (e.g. routers outside a Firewall)
Program Name: conf_bkup_show_run
The configuration filename that is saved is <router_name--confg.txt>. There is also an option to have the configuration filename be the name/ip_address that is specified in the router file (i.e. –rf <filename>). This is done using the –urfn option. For example, if one of the lines in the router file is 10.10.1.1, then the config file name would be 10.10.1.1--confg.txt. The directory that the configuration files are saved to can also be changed using the “-dir” option. If the -dir option is omitted; by default the script will save the router configuration files to the following locations:
If the directory does not exist, the script will create it. If the -dir option is used with a relative path name (not absolute path name), the stated directory is relative to the directories stated in the above table
Sample Command: The following command will backup the configuration files for the routers listed in the file rtrs.rt. The configuration files will be stored in the directory $HOME/net-scripts/02-25-03_configs. The config files will automatically be touched on the TFTP server. The –tftproot option also causes the script to automatically create the directory specified in the –subdir option. It will also save the configuration to NVRAM using the “write memory” command. The script WILL prompt the user for passwords because the -pw option is not being used.
conf_bkup_show_run –rf rtrs.rt –dir 02-25-03_configs -wm
|