Configuration Files
All configuration settings for the device are handled in the
configuration files on the device. These files are saved in the /config
directory on the device.
Configuration File Selection Sequence
During the boot process, the device is configured
based on a predefined configuration file. The device selects the configuration
file based on the sequence shown in
Figure 1.

The configuration file selection process occurs in the following sequence:
/config/juniper.conf.gz
—Active configuration file./config/rescue.conf.gz
—Rescue configuration file. This file is created by the router or switch administrator./config/juniper.conf.1.gz
—First rollback configuration./etc/config/factory.conf
—Default factory configuration file.The
factory.conf
file is the initial device configuration file shipped with the system. All configuration settings are returned to the factory default, and access to the device is restricted to the console. For more information about setting up your device from the factory default configuration, see the specific hardware guide for your device.
For SRX Series Services Gateways running Junos OS Release 10.0
or later, the current operational Junos OS configuration is stored
in the juniper.conf.gz
file. The
last three committed configurations are stored in the files juniper.conf.1.gz
through juniper.conf.3.gz
. The rescue configuration is stored in the rescue.conf.gz
file. These files are located in the /config directory
. The remaining archived configuration files juniper.conf.4.gz
through juniper.conf.49.gz
are
saved in the /var/db/config directory
. Configuration files are located in the SRX series compact flash
drive.
To list the configuration files, use the file list /config operational mode command.
user@host>file list /config
/config: .snap/ db_ext db_ext- juniper.conf+.gz juniper.conf.1.gz juniper.conf.2.gz juniper.conf.3.gz juniper.conf.gz license/ license-status.db rescue.conf.gz usage.db usage.db.1344499761
Remote Storage of Configuration Files
Configuration files can be stored off the device. This can be helpful if the device encounters a software failure or other problem that forces you to restore the device’s software. Once the software is restored, you can then reload the saved configuration file. For more information about restoring Junos OS, see Loading and Committing the Configuration File.
When the configuration file is stored off the device, you can encrypt the configuration files using the Data Encryption Standard (DES) encryption algorithm.