Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Default Directories for Junos OS File Storage on the Router or Switch

 

Junos OS files are stored in the following directories on the router or switch:

  • /altconfig—When you back up the currently running and active file system partitions on the router or switch to standby partitions using the request system snapshot command, the /config directory is backed up to /altconfig. Normally, the /config directory is on the CompactFlash card and /altconfig is on the hard disk.

  • /altroot—When you back up the currently running and active file system partitions on the router to standby partitions using the request system snapshot command, the root file system (/) is backed up to /altroot. Normally, the root directory is on the CompactFlash card and /altroot is on the hard disk.

  • /config—This directory is located on the primary boot device, that is, on the device from which the router or switch booted (generally the CompactFlash card (device wd0) or internal flash storage). This directory contains the current operational router or switch configuration and the last three committed configurations, in the files juniper.conf, juniper.conf.1, juniper.conf.2, and juniper.conf.3, respectively.

  • /var—This directory is located either on the hard disk (device wd2) or internal flash storage. It contains the following subdirectories:

    • /home—Contains users’ home directories, which are created when you create user access accounts. For users using SSH authentication, their .ssh file, which contains their SSH key, is placed in their home directory. When a user saves or loads a configuration file, that file is loaded from the user’s home directory unless the user specifies a full pathname.

    • /db/config—Contains up to 46 additional previous versions of committed configurations, which are stored in the files juniper.conf.4.gz through juniper.conf.49.gz.

    • /log—Contains system log and tracing files.

    • /tmp—Contains core files. The software saves up to five core files, numbered from 0 through 4. File number 0 is the oldest core file and file number 4 is the newest core file. To preserve the oldest core files, the software overwrites the newest core file, number 4, with any subsequent core file.

Each router or switch ships with removable media (device wfd0) that contains a backup copy of Junos OS.

Directories on the Logical System

In addition to saving the configuration of logical systems in the current juniper.conf file, each logical system has an individual directory structure created in the /var/logical-systems/logical-system-name directory.

The /var/logical-systems/logical-system-name directory contains the following subdirectories:

  • /config—Contains the current operational configuration specific to the logical system.

  • /log—Contains system log and tracing files specific to the logical system.

    To maintain backward compatibility for the log files with previous versions of Junos OS, a symbolic link (symlink) from the /var/logs/logical-system-name directory to the /var/logical-systems/logical-system-name directory is created when a logical system is configured.

  • /tmp—Contains temporary files specific to the logical system.

This file system for each logical system enables logical system users to view trace logs and modify logical system files. Logical system administrators have full access to view and modify all files specific to the logical system.

Logical system users and administrators can save and load configuration files at the logical-system hierarchy level using the save and load configuration mode commands. In addition, they can also issue the show log, monitor, and file operational mode commands at the logical-system hierarchy level.