Ever wanted to quickly save a copy of your Cisco router's running-config or startup-config to a file on your local machine so that you could have something to compare against or restore to? If so, you can start with this example script: Cisco-SaveDeviceConfigToFile.py.txt.
Comments within the script file itself provide explanation of how to set it up and what to expect. But if you're looking for a quick way to get started we've provided this example below:
On Windows, when you press the button you've mapped and the script completes, the saved file will be selected in a Windows Explorer file view. For example:
Example Uses of Arguments:
Save the startup-config to a file, prompting for filename using default template values. SecureCRT continues running after the script completes.
Save the running-config to a file, prompting for filename using default template values. SecureCRT continues running after the script completes.
Save the running configuration for just Vlan 1; run unattended, but leave SecureCRT running when the script terminates:
running int Vlan 1 /interactive:true /auto-close:false
Save the more verbose version of a running config (running all); run interactively, but don't prompt for file name to save:
running all /interactive:true /confirm-filename:false
Save the startup-config to a file, but don't prompt for filename -- just save it to the templated name the script provides. SecureCRT continues running after the script completes:
Save the running config; runs unattended and SecureCRT closes automatically when the script completes:
Save the running config using the more:system:running-config command; runs unattended but does not close SecureCRT automatically when the script completes:
running /interactive:false /asa-uses-more:true /auto-close-app:false
Save complete (including default values) running config (running all). Runs "interactively" but does not prompt for filename (uses default template-based time stamped file name).
running all /interactive:yes /confirm-filename:no /auto-close-app:no /asa-uses-more:no
Same as above, but resulting config files are all stored in the same flat destination folder.
running all /interactive:yes /confirm-filename:no /auto-close-app:no /use-sessmgr-tree:false /asa-uses-more:no
Save the startup config with line numbered mode activated. Interactive (so that, on Windows, the File Explorer will open with the resulting file selected), but automated file name used. Session Manager folder structure is used for determining a mirrored folder in which to store saved config files.
startup linenum /interactive:yes /confirm-filename:no /auto-close-app:no
Same as above, but with a flat folder housing all saved configs rather than mirroring the Session Manager tree.
startup linenum /interactive:yes /confirm-filename:no /auto-close-app:no /use-sessmgr-tree:false
Here you can control cookies using the checkboxes below. Some cookies are essential for the use of our website and cannot be disabled. Others provide a convenience to the user and, if disabled, may reduce the ease of use of our site. Finally, some cookies provide anonymous analytic tracking data that help us provide the user with a richer browsing experience. You can elect to disable these cookies as well.