Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Saving a Configuration to a File

Save the Junos OS configuration to a file so that you can edit it with a text editor of your choice. You can save your current configuration to an ASCII file, which saves the configuration in its current form, including any uncommitted changes. If more than one user is modifying the configuration, all changes made by all users are saved.

To save software configuration changes to an ASCII file, use the save configuration mode command:

[edit]user@host# save filename [edit]user@host#

The contents of the current level of the statement hierarchy (and below) are saved, along with the statement hierarchy containing it. This allows a section of the configuration to be saved, while fully specifying the statement hierarchy.

By default, the configuration is saved to a file in your home directory, which is on the flash drive.

When you issue this command from anywhere in the hierarchy (except the top level), a replace tag is automatically included at the beginning of the file. You can use the replace tag to control how a configuration is loaded from a file.

user@host> file show /var/home/user/myconf replace:
protocols { bgp { disable; group int { type internal;}} isis { disable; interface all { level 1 disable;} interface fxp0.0 { disable;}} ospf { traffic-engineering; reference-bandwidth 4g;...}}

Published: 2013-08-15

Published: 2013-08-15