Junos
Junos

What are the config files and where are they located on a JUNOS router?

02.11.09   |  
‎02-11-2009 11:54 PM



juniper.conf.gz
It is THE config. It is used for rollback 0.
Note that juniper.conf juniper.conf.gz and juniper.conf.gz.jc
are morally equivalent.

Lives in: /config

juniper.db
This is the shared candidate database

Lives in: /var/run/db

juniper.data
This is the committed config database (i.e., the active configuration).

Lives in: /var/run/db

juniper.data+
A copy of the candidate db, used during commit check, and
during commit, becomes juniper.data if all is well.

Lives in: /var/run/db

juniper.conf+.gz
This is the candidate configuration and only exists during commit.

Lives in: /config

junper.save
juniper.data may contain the results of expanding groups and applying
transient changes from commit scripts, in either case, juniper.save
represents the committed db before those changes are applied.

This is needed for seeding private edit sessions and looking at the committed config without inheritance etc.

Lives in: /var/run/db

juniper.conf.1.gz through juniper.conf.3.gz
Rollback configurations 1 through 3.

Live in: /config

juniper.conf.4.gz through juniper.conf.49.gz
Rollback configurations 4 through 49.

Also, on JSeries at least the balance of configs in /config and
/var/db/config is configurable.

Live in: /var/db/config

rescue.conf.gz
A copy of a known good and working configuration that you can load in case of an emergency without having to remember which rollback number to use.

Lives in: /config
Follow me on Twitter @anwar_raheel

--
If this post was helpful, please mark this post as an "Accepted Solution".
Kudos are always appreciated!
10 REPLIES
Junos

Re: What are the config files and where are they located on a JUNOS router?

06.13.09   |  
‎06-13-2009 12:35 AM

excellent post, thanks for sharing.

 

Ashley

Junos

Re: What are the config files and where are they located on a JUNOS router?

12.26.09   |  
‎12-26-2009 09:39 PM

Hi Raheel

 

Can you please let me know what is the location for JUNOS software active and backup both? I want to copy JUNOS software from router to ftp server.

 

Thanks for your help

Junos

Re: What are the config files and where are they located on a JUNOS router?

07.14.10   |  
‎07-14-2010 04:19 PM

aeroplane wrote:

Hi Raheel

 

Can you please let me know what is the location for JUNOS software active and backup both? I want to copy JUNOS software from router to ftp server.

 

Thanks for your help


The easiest solution might be to enter configuration mode, save your configuration to your home directory, and then SFTP that off of the box.

Junos

Re: What are the config files and where are they located on a JUNOS router?

08.11.10   |  
‎08-11-2010 01:19 PM

Hi Aeroplane,

Sounds like you are looking for the jinstall file (for M/T/MX/TX series).  When the software is installed, it could potentially be unpacked from the jinstall anywhere on the file system to be split into several packages such as the jpfe, jbase, jcrypto, etc.  However, generally the jinstall file is saved in /var/tmp before "request system software add" is run, and that file is not removed automatically as part of the upgrade procedure.  Alternatively, it could be in one of the user directories on /var/home. 

 

This jinstall file is what you want to archive onto your FTP server, rather than any of the individual bundles anyway.

 

Hope this helps,

-JJ

Junos

Re: What are the config files and where are they located on a JUNOS router?

09.09.10   |  
‎09-09-2010 07:49 PM

Good doc.Thanks for shared.

Junos

Re: What are the config files and where are they located on a JUNOS router?

10.18.10   |  
‎10-18-2010 09:19 AM

Backup of JunOS software is placed at /var/sw/pkg. You can copy it through TFTP ....

 

Thanks


aeroplane wrote:

Hi Raheel

 

Can you please let me know what is the location for JUNOS software active and backup both? I want to copy JUNOS software from router to ftp server.

 

Thanks for your help


 

Hafiz Muhammad Farooq
JNCIE-SEC, JNCIP-SEC, JNCIS-SEC, JNCIS-FWV
JNCIS-SP, JNCIS-SA, JNCIA-JUNOS
IBM Qradar Deployment Professional

[Please mark it as Accepted Solution if it works, Kudos if you like]

Junos

Re: What are the config files and where are they located on a JUNOS router?

05.16.11   |  
‎05-16-2011 01:01 AM

Hi Raheel,

Thanks for a great post! I have couple of things to add, may be this will be useful
for someone.

1) If you use a "configure dynamic" feature, the database file is /var/run/db/juniper.dyn

2) The size limit for the configuration databases (for each of the files juniper.data
and juniper.dyn) is about 716MB - at least for JunOS 10.x on MX platforms.
If this maximum will not be enough for your config, the system will not be able to
increase the file size at some point, and you will get a commit error.

Best Regards,
PK

Juniper Ambassador, Juniper Networks Certified Instructor,
JNCIE-SEC #98, JNCIE-ENT #393, JNCIE-SP #2253
[Juniper Authorized Education & Support in Russia]
Highlighted
Junos

Re: What are the config files and where are they located on a JUNOS router?

07.20.11   |  
‎07-20-2011 06:16 PM

thanks for sharing, wonderful post.

 

Todd

Junos

Re: What are the config files and where are they located on a JUNOS router?

04.05.13   |  
‎04-05-2013 04:18 AM

Thanks for the post

Junos

Re: What are the config files and where are they located on a JUNOS router?

07.01.13   |  
‎07-01-2013 12:21 AM

Configuration backup from 0-3 & rescue configuration are available in /config

 

root@SW08COC02> file list /config/

juniper.conf.1.gz
juniper.conf.2.gz
juniper.conf.3.gz
juniper.conf.gz
juniper.conf.md5*
rescue.conf.gz

 

 

Configuration backup from 4-49 is available in /config/db/config; however it can also be accessed via /var/db/config
because of the link below!

root@SW08COC02> file list /var/db

config@ -> /config/db/config