12-19-2011 10:07 PM - edited 12-19-2011 10:12 PM
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?
12-19-2011 11:16 PM - edited 12-19-2011 11:18 PM
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> exitsimilar, more detailed guide on EX switches
http://kb.juniper.net/InfoCenter/index?page=conten
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.confautomatically save configuration to remote site via scp(ssh)/ftp. and then copy it to clusterB (via usb, or ftp as before)
{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=conten
user1@clusterA# show | no-more
----------
user2@clusterB# delete ... yes user2@clusterB# load merge terminal ... paste your configuration ... press Ctrl+D
Jozef Klacko
12-20-2011 06:14 PM - edited 12-20-2011 06:14 PM
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 ![]()