Junos
Reply
Distinguished Expert
Raheel
Posts: 414
Registered: ‎06-18-2008

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




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!
Ash
Contributor
Ash
Posts: 14
Registered: ‎06-13-2009
0

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

excellent post, thanks for sharing.

 

Ashley

Contributor
aeroplane
Posts: 724
Registered: ‎06-30-2009
0

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

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

Trusted Contributor
mawr
Posts: 236
Registered: ‎06-11-2010
0

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


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.

Trusted Contributor
Trusted Contributor
JJ
Posts: 53
Registered: ‎11-06-2007
0

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

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

Visitor
Bay Wei
Posts: 1
Registered: ‎09-09-2010
0

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

Good doc.Thanks for shared.

Recognized Expert
rasmus
Posts: 378
Registered: ‎02-28-2010
0

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

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]

Distinguished Expert
Distinguished Expert
pk
Posts: 801
Registered: ‎10-09-2008
0

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

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,
Petr (PK)

Juniper Ambassador, Juniper Networks Certified Instructor,
JNCIE-SEC #98, JNCIE-ENT #393, JNCIE-SP #2253
[Juniper Authorized Education & Support in Russia]
Visitor
t.smith
Posts: 7
Registered: ‎07-20-2011
0

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

thanks for sharing, wonderful post.

 

Todd

New User
slim.sidhom@nsn.com
Posts: 1
Registered: ‎08-03-2012
0

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

Thanks for the post

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.