|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Mailing List
|
By Joining the mailing list you will be notified of site updates.
|
|
Show Your Support For
This Site By Donating:
|
|
|
|
|
|
|
Audience: Network Admins
Last Updated: 5/12/2014 1:35:16 AM
**All times are EST**
|
|
Juniper SRX save config to USB drive
By Erik Rodriguez
Tags: Juniper SRX backup config, SRX mount thumb drive, JunOS mount flash drive, Juniper SRX USB
This article provides a method for mounting a USB drive and saving the current configuration to it.
Problem
You would like to save your config to a USB drive for backup or before a code upgrade. The following example is done with 256MB flash drive, but the process is the same with a larger one. I verified these instructions will work with an 8GB drive so don't worry about the filesystem on your thumb drive. As long as is FAT or FAT32 it will work. If you have a Linux/UNIX background this will seem very familiar, if not, follow the steps below:
Procedure
Insert your USB drive into port 0 on the SRX. Once you see activity, login the SRX (do not enter the CLI) and issue the following command:
root@srx% tail /var/log/messages
May 13 11:52:48 srx.sanjose /kernel: umass0: LEXAR MEDIA JUMPDRIVE PRO, rev 2.00/0.00, addr 2
May 13 11:52:48 srx.sanjose /kernel: da0 at umass-sim0 bus 0 target 0 lun 0
May 13 11:52:48 srx.sanjose /kernel: da0: LEXAR JUMPDRIVE PRO 0> Removable Direct Access SCSI-2 device
May 13 11:52:48 srx.sanjose /kernel: da0: 40.000MB/s transfers
May 13 11:52:48 srx.sanjose /kernel: da0: 246MB (503808 512 byte sectors: 64H 32S/T 246C)
Notice the device being detected by the SRX as da0. From here enter the following to see what the new device is called by the OS so we can mount it to a folder.
root@srx.sanjose% ls /dev/da*
/dev/da0 /dev/da0s1
Next, we will create a directory that will be pointed to the USB drive so that we can save files to it.
root@srx.sanjose% mkdir backup
You can use whatever you want, I chose backup. Next use the following command to mount it. Remember the items in red are specific to your system. The msdos file system will work as long as the drive was formatted with a FAT/FAT32 filesystem.
root@srx.sanjose% mount_msdosfs /dev/da0s1 backup
You should see the backup directory which is now located on the USB drive.
root@srx.sanjose% ls
.cshrc .history .login .profile backup
Now enter the cli and configure mode. Choose a file name to backup your configuration and now you have a USB drive that is safely housing a backup config file:
root@srx.sanjose> cli
{primary:node0}
root@srx.sanjose> configure
warning: Clustering enabled; using private edit
warning: uncommitted changes will be discarded on exit
Entering configuration mode
{primary:node0}[edit]
root@srx.sanjose# save backup/srx-config
Wrote 2006 lines of configuration to 'backup/srx-config'
Alternatively, if you already have the file you wish to copy on 1 node of your firewall cluster, you can copy that file between members using the following command:
rcp -T /backup/srx-config node1:/var/tmp/srx-config
Notice that above, we are copying the srx-config file from the USB drive to /var/tmp on node 1.
Contact Us
NOTE: this form DOES NOT e-mail this article, it sends feedback to the author.
|
|
|
|
|
|