In order to write the current candidate configuration to the permanent storage, we enter a save command along with the path to locate the candidate configuration.
Ex:
[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. The load command helps us to restore files to the candidate configuration.
/var/home directory is located on the router's hard drive. It contains a subdirectory for each configured user on the router. These individual user directories are the default file location for many JUNOS software commands.
Viewing, comparing, and loading configuration files: You can create a file containing configuration data for a device running Junos OS, copy the file to the local router, and then load the file into the CLI. After you have loaded the file, you can commit it to activate the configuration on the router, or you can edit the configuration interactively using the CLI and commit it at a later time.
You can also create a configuration while typing at the terminal and then load it. Loading a configuration from the terminal is generally useful when you are cutting existing portions of the configuration and pasting them elsewhere in the configuration.
Ex:
[edit]
user@host# load (factory-default | merge | override | patch | replace | set | update) filename
<relative> <json>
config directory is located on the router's internal flash drive.
/var/log directory is located on the router's hard drive.
J-Web is a GUI used to configure the junos devices. The J-Web interface allows you to monitor, configure, troubleshoot, and manage the routing platform by means of a Web browser enabled with Hypertext Transfer Protocol (HTTP) or HTTP over Secure Sockets Layer (HTTPS). J-Web provides access to all the configuration statements supported by the routing platform, so you can fully configure it without using the Junos OS CLI.
You can perform the following tasks with the J-Web interface:
Monitoring - Display the current configuration and information about the system, interfaces, chassis, routing protocols, routing tables, routing policy filters, and other features.
Configuring - The J-Web interface provides the following different configuration methods:
Maintaining - Manage log, temporary, and core (crash) files and schedule reboots on the routing platforms.
Configuring and monitoring events - Filter and view system log messages that record events occurring on the router. You can configure files to log system log messages and also assign attributes, such as severity levels, to messages.
The JUNOS software stores multitudes of information in files on the router. The configuration and rollback files are stored using save command, and new versions of the JUNOS software itself. The router stores these files in various directories, including:
/config: This directory is located on the router's internal flash drive. It contains the active configuration (juniper.conf) and rollback files 1, 2, and 3.
/var/db/config: This directory is located on the router's hard drive and contains rollback files 4 through 9.
/var/tmp: This directory is located on the router's hard drive. It holds core files from the various daemons on the Routing Engines. Core files are generated when a particular daemon crashes and are used by Juniper Networks engineers to diagnose the reason for failure.
/var/log: This directory is located on the router's hard drive. It contains files generated by both the router's logging function as well as the traceoptions command.
/var/home: This directory is located on the router's hard drive. It contains a subdirectory for each configured user on the router. These individual user directories are the default file location for many JUNOS software commands.
/altroot: This directory is located on the router's hard drive and contains a copy of the root file structure from the internal flash drive. This directory is used in certain disaster-recovery modes where the internal flash drive is not operational.
/altconfig: This directory is located on the router's hard drive and contains a copy of the /config file structure from the internal flash drive. This directory is also used in certain disaster recovery modes where the internal flash drive is not operational.
You can view the router's directory structure as well as individual files by issuing the file command in operational mode:
user@router> file ?
In juniper devices, there is an option to load our configuration back to the factory default state. The use of 'load factory-default' command in configuration mode hierarchy reverts our device to the factory default state. You can also use the load factory-default command to revert to the factory-default configuration file that contains all default settings except the root password setting, which is retained.
The load factory-default command in Config mode will erase only the existing configuration and load the factory-default configuration. However, the root-authentication password must be set before committing the configuration.
If a configuration fails or denies management access to the services gateway, you can use the RESET CONFIG button to restore the services gateway to the factory default configuration or a rescue configuration. For example, if someone inadvertently commits a configuration that denies management access to a services gateway, you can delete the invalid configuration and replace it with a rescue configuration by pressing the RESET CONFIG button. The button is recessed to prevent it from being pressed accidentally.
The rescue configuration is a previously committed, valid configuration. You must have previously set the rescue configuration through the J-Web interface or the CLI.