SRX Services Gateway
Reply
Trusted Contributor
Luca
Posts: 314
Registered: ‎06-11-2009
0

Need to transfer a big config between SRXs

[ Edited ]

I need to trasfer a config between two SRX clusters.

 

Cluster A is current cluster and has about 15,000 lines of config.

Cluster B is new cluster and this is where the config from cluster A needs to be restored to.

 

I could do a 'show config | display set' and copy and paste that into the new cluster but this may have issues while pasting.

 

I can upload a config from GUI, would that be the best way?

 

Or - save rescue config on Cluster A - copy that rescue config to cluster B, then on cluster B 'rollback rescue'?

Any other suggestions?

Trusted Contributor
jozef.klacko
Posts: 142
Registered: ‎07-19-2010
0

Re: Need to transfer a big config between SRXs

[ Edited ]

Hi,

 

You have many options:

 

save configuration and copy it via ftp, scp, usb

 

Copy configuration to usb: (be carefull. sometimes unplugging usb without unmount could restart your srx)

You have to put usb in primary node (show chassis cluster status), here it is device /dev/da1s1 but could be other name. You should be connected to console to see name of device added.

1. save text configuration

2. show where it was saved (print your actual working directory)

3. start shell as root, create directory, mount usb to that directory, unmount and unplug usb

4. plug usb to other chassis cluster, mount usb, load configuration, commit (and cross your fingers), umount and unplug usb

 

{primary:node0}
user1@juniper> show configuration |save clusterA.conf 
Wrote 1158 lines of output to 'clusterA.conf'

{primary:node0}
user1@juniper> file list 

/cf/var/home/user1/:
.ssh/
clusterA.conf

{primary:node0}
user1@juniper> start shell user root  
Password:
root@juniper% mount -t msdosfs /dev/da1s1 /var/tmp/usb
root@juniper% cp /cf/var/home/user1/clusterA.conf /var/tmp/usb
root@juniper% umount /var/tmp/usb
root@juniper% exit
user1@juniper> exit

---------

user2@clusterB> start shell user root
root@clusterB% mkdir /var/tmp/usb
root@clusterB% mount -t msdosfs /dev/da1s1 /var/tmp/usb
root@clusterB% exit
user2@clusterB> conf
user2@clusterB# load override /var/tmp/usb/clusterA.conf
user2@clusterB# commit
user2@clusterB# exit
user2@clusterB> start shell user root
root@clusterB% umount /var/tmp/usb
root@clusterB> exit

similar, more detailed guide on EX switches

http://kb.juniper.net/InfoCenter/index?page=content&id=KB12022&smlogin=true

 

copy it via ftp

- you have two options (1. save conf clusterA localy on your pc and then transfer it to cluster B or log into clusterB and load configuration from clusterA via ftp/scp)

- turn on ftp and/or ssh (scp) server on srx clusterA, (do the same on clusterB if you are going to save it locally), save clusterA configuration and transfer file to your computer and then to srx. Or even better would be log to clusterB and copy configuration directly from clusterA - next code paragraph

{primary:node0}[edit]
user1@clusterA# set system services ftp  

{primary:node0}[edit]
user1@clusterA# set system services ssh  

{primary:node0}[edit] user1@clusterA# commit

{primary:node0}[edit] user1@clusterA# save | clusterA.conf
{primary:node0}[edit]
user2@clusterB> 
user2@clusterB> conf
user2@clusterB# load override ftp://user1:password@clusterA-IPaddr/clusterA.conf

automatically save configuration to remote site via scp(ssh)/ftp. and then copy it to clusterB (via usb, or ftp as before)

http://www.juniper.net/techpubs/en_US/junos9.5/information-products/topic-collections/swconfig-syste...

{primary:node0}[edit]
user1@clusterA# set system archival configuration transfer-on-commit
user1@clusterA# set system archival configuration archive-sites "scp://aabb@SERVER-IPaddress:/home/aabb/juniper" password XXX
user1@clusterA# commit

 

show configuration (without pushing <space>)

on clusterB, paste load configuration. you could also do it per partes i.e. interfaces, system configuration, protcols. see link

http://kb.juniper.net/InfoCenter/index?page=content&id=KB16622

user1@clusterA# show | no-more
----------
user2@clusterB# delete ... yes user2@clusterB# load merge terminal ... paste your configuration ... press Ctrl+D

 

Jozef Klacko


Contributor
TravisJohnson
Posts: 116
Registered: ‎12-14-2009
0

Re: Need to transfer a big config between SRXs

[ Edited ]

Jozef, good info, alternately you could put it on a usb and load from that file, or securely using SCP instead of FTP.

 

EDIT: Oops, missed your note on USB :smileyhappy:

________________________________________________


If my post helped you, please feel free to give me kudos.
Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.