Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

How to mount a USB disk for configuration file backup or restore for the EX-series Ethernet switch



Article ID: KB12022 KB Last Updated: 28 Dec 2018Version: 5.0
This article provides information on how to mount a USB disk device via the USB port on the EX-series switch. This procedure can be useful for backing up or restoring configuration files, uploading a software image, or copying other files to the USB device. 
How do I backup a configuration file to an external USB disk and then restore or copy it to another EX-series Ethernet switch?
USB Requirements:

The USB port on the rear panel of an EX-series switch accepts a USB storage device or USB storage device adapter with a compact flash disk installed, as defined in the CompactFlash Specification published by the CompactFlash Association. This information is provided in the Complete Hardware Guide for EX 3200 and EX 4200 Switches guide.

NOTE: Recommended USB device is Sandisk with FAT32 format.

Backup procedure:
  • Insert SANDISK in the usb port available on the rear panel of EX-series Ethernet switch.
Note: When the USB disk is inserted in the USB port on the EX switch, you should see similar messages as the ones listed below.  This message will be displayed to the console and the '/var/log/messages' file.
umass1: SanDisk Cruzer Micro, rev 2.00/2.00, addr 3
da1 at umass-sim1 bus 1 target 0 lun 0
<SanDisk Cruzer 7.01> Removable Direct Access SCSI-0 device
da1: 40.000MB/s transfers
1939MB (3973119 512 byte sectors: 255H 63S/T 247C)
  • Enter the shell as root:
user@switch> start shell user root
  • Mount SANDISK to /mnt
root@switch% mount_msdosfs /dev/da1s1 /mnt
  • Copy the most recent 4 configuration files under /config  to the USB disk:
root@switch% cp /config/*.gz /mnt
root@switch% ls /mnt
juniper.conf.1.gz       juniper.conf.3.gz       rescue.conf.gz
juniper.conf.2.gz       juniper.conf.gz

Note: The other configuration files are located in /config/db/config. Copy  the configuration files to the USB as required.
  • Unmount usb disk and then pull it out:

    user@switch% umount /mnt

Restore procedure:

Repeat the first 3 steps  as per the Backup procedure and then:
  • Check the contents in USB disk
    root@switch% ls /mnt
    juniper.conf.1.gz       juniper.conf.3.gz       rescue.conf.gz
    juniper.conf.2.gz       juniper.conf.gz
  • Exit to configuration mode and load the configuration file, then commit it.
root@switch% exit

user@switch> configure
Entering configuration mode

user@switch#  load override /mnt/juniper.conf.gz
load complete

user@switch# commit
commit complete

  • Unmount USB disk from shell as user root and then pull out it.

user@switch> start shell user root
root@switch% umount /mnt
  • Pull the USB out  of the EX-series switch USB port

root@switch% exit
Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search