Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Backing Up the Existing Installation on Devices

    During a successful upgrade, the upgrade package completely reinstalls the existing Junos OS. It retains configuration files, log files, and similar information from the previous version—that is, all stored files except the juniper.conf and SSH files are removed. You should back up the existing installation so that you can return to it if needed. In a system with redundant Routing Engines, you need to back up both Routing Engines. You can use either the J-Web user interface or the CLI to back up the primary boot device on to the secondary storage device.

    Creating a backup has the following advantages:

    • The device can boot from a backup and come back online in case of failure or corruption of the primary boot device in the event of power failure during an upgrade.
    • Your active configuration files and log files are retained.
    • The device can recover from a known, stable environment in case of an unsuccessful upgrade.

    The following subsections describe how to back up the existing installation using some form of the request system snapshot command. After you issue the request system snapshot command, you cannot return to the previous version of the software, because the running copy and the backup copy of the software are identical.

    Backing Up the Existing Installation to the Router’s Solid-State Drive

    This procedure can be used for all routers that have a CompactFlash card. On routers without a CompactFlash card, where the hard disk is the primary boot device, for example, an MX104 router, when you issue the request system snapshot operational command, the backup is done on the first USB storage media device.

    To back up the existing installation on a router to the router’s hard disk or solid-state drive (SSD):

    • Issue the request system snapshot CLI operational command:
      user@host> request system snapshot

      When the request system snapshot command is issued, the /root file system is backed up to /altroot, and /config is backed up to /altconfig. The /root and /config file systems are on the router’s CompactFlash card, and the /altroot and /altconfig file systems are on the router’s hard disk or SSD.

      When the backup is completed, the current and backup software installations are identical.

    Note: If the installation files are on the NAND flash device and you issue the request system snapshot CLI operational command, the backup is done on the first USB storage media device.

    Backing Up the Existing Installation on a Router to a Specified External Device

    On routers that do not have a CompactFlash card, you can back up your software installation to a specified external storage media device.

    The following procedure can be used on all routers except the ACX5000 line of routers.

    To back up the existing installation on router to a specified external storage media device:

    • Issue the request system snapshot media CLI operational command. For example:
      user@host > request system snapshot media usb1

    Backing Up the Existing Installation on ACX5000 Series Routers

    When backing on the ACX5000 line of routers, use the request system snapshot slice alternate command. The files are backed up to an external USB storage device.

    Note: The ACX5000 line of routers do not have a NAND flash memory or an alternate slice for Junos OS. On the ACX5000 line of routers, Junos OS runs as a virtual machine on a host image.

    To back up the existing installation on the ACX5000 line of routers:

    • Issue the request system snapshot slice alternate CLI operational command. For example:
      user@host > request system snapshot slice alternate

      If an external USB is not inserted to the router, then the command shows the following error:

      user@host> request system snapshot slice alternate
      fpc0:
      --------------------------------------------------
      error: usb (/dev/da0) media missing or invalid
      --------------------------------------------------

    Backing Up the Existing Installation on a Router to a NAND Flash Device

    On ACX Series routers, except ACX5000 routers, when you issue the request system snapshot slice alternate command, the command backs up the files to the router’s NAND flash.

    To back up the existing installation on ACX Routers to a NAND flash device:

    • Issue the request system snapshot slice alternate CLI operational command. For example:
      user@host > request system snapshot slice alternate

      When this command is issued, the /root file system is backed up to /altroot, and /config is backed up to /altconfig on the router’s NAND flash device.

    Backing Up the Existing Installation on SRX5800, SRX5600, and SRX5400 Devices

    Back up the existing installation so that you can return to it. The installation process using the installation package (jinstall*, for example) removes all stored files on the device except the juniper.conf and SSH files. Therefore, you should back up your existing configuration in case you need to return to it after running the installation program.

    To back up Junos OS on the SRX Series devices, issue the request system snapshot CLI operational command. This command saves the existing software installation on the hard disk, external USB storage media device, or solid-state drive (SSD).

    When the request system snapshot command is issued, the /root file system is backed up to /altroot, and /config is backed up to /altconfig. The /root and /config file systems are on the devices’s CompactFlash card, and the /altroot and /altconfig file systems are on the devices’s hard disk or or solid-state drive (SSD). When the backup is completed, the existing and backup software installations are identical.

    To copy the files to the device’s hard disk or solid-state drive (SSD), use the following command:

    user@host> request system snapshot media

    Backing Up the Existing Installation on SRX300, SRX320, SRX340, SRX345, and SRX550M Devices

    On SRX Series devices, you can backup the existing Junos OS image and configuration files onto a media (such as a USB or CompactFlash) so that you can retrieve it back if something goes wrong.

    To back up the currently running and active file system partitions on the device, use the following command:

    user@host> request system snapshot media

    Following options are supported:

    • internal— Copies the snapshot to internal media.
    • usb— Copies the snapshot to the USB storage device. This is the default option for SRX300, SRX320, SRX340, SRX345, and SRX550M devices.
    • external— Copies the snapshot to an external storage device. This option is available for the compact flash on the SRX650 Services Gateway only.

    Configuring External CompactFlash for SRX650 Devices

    Following procedure shows how to backup existing installation on an SRX650 device.

    The SRX650 Services Gateway includes the following 2 GB CompactFlash (CF) storage device:

    • The Services and Routing Engine (SRE) contains a hot-pluggable external CF storage device used to upload and download files.
    • The chassis contains an internal CF used to store the operating system.

    By default, only the internal CF is enabled and an option to take a snapshot of the configuration from the internal CF to the external CF is not supported. This can be done only by using a USB storage device.

    To take a snapshot of the configuration from the external CF:

    1. Take a snapshot from the internal CF to a USB storage device using the request system snapshot media usb command.
    2. Reboot the device from the USB storage device using the request system reboot media usb command.
    3. Go to the U-boot prompt.
    4. Stop at U-boot and set the following variables:
      set ext.cf.pref 1
         save
         reset
      
    5. Once the system is booted from the USB storage device, take a snapshot from the external CF using the request system snapshot media external command.

      Note: Once the snapshot is taken on the external CF, we recommend that you set the ext.cf.pref to 0 at the U-boot prompt.

    Verifying That a System Snapshot Was Created on an EX Series Switch

    Purpose

    Verify that a system snapshot was created with the proper files on an EX Series switch.

    Action

    View the snapshot:

    user@switch> show system snapshot media external
    Information for snapshot on       external (/dev/da1s1a) (backup)
    Creation date: Mar 19 03:37:18 2012
    JUNOS version on snapshot:
      jbase  : ex-12.1I20120111_0048_user
      jcrypto-ex: 12.1I20120111_0048_user
      jdocs-ex: 12.1I20120111_0048_user
      jroute-ex: 12.1I20120111_0048_user
      jswitch-ex: 12.1I20120111_0048_user
      jweb-ex: 12.1I20120111_0048_user
    Information for snapshot on       external (/dev/da1s2a) (primary)
    Creation date: Mar 19 03:38:25 2012
    JUNOS version on snapshot:
      jbase  : ex-12.2I20120305_2240_user
      jcrypto-ex: 12.2I20120305_2240_user
      jdocs-ex: 12.2I20120305_2240_user
      jroute-ex: 12.2I20120305_2240_user
      jswitch-ex: 12.2I20120305_2240_user
      jweb-ex: 12.2I20120305_2240_user

    Meaning

    The output shows the date and time when the snapshot was created and the packages that are part of the snapshot. Check to see that the date and time match the time when you created the snapshot.

    You can compare the output of this command to the output of the show system software command to ensure that the snapshot contains the same packages as the software currently running the switch.

    Verifying That a System Snapshot Was Created on a QFX Series Switch

    Purpose

    Verify that a system snapshot was created with the proper files on a QFX Series switch.

    Note: System snapshot is not supported on QFX10000 switches.

    Action

    View the snapshot on a switch:

    show system snapshot slice 1

    user@switch> show system snapshot slice 1
    Information for snapshot on external (da1s1)
    Creation date: Sep 28 15:39:47 2011
    JUNOS version on snapshot:
      jbase  : qfx-11.3-20110922.0
      jcrypto: qfx-11.3-20110922.0
      jdocs  : qfx-11.3-20110922.0
      jkernel: qfx-11.3-20110922.0
      jroute : qfx-11.3-20110922.0
      jswitch: qfx-11.3-20110922.0
      jpfe   : qfx-e9xxx-11.3-20110922.0
    

    View the snapshot on a QFX5100 switch:

    show system snapshot

    user@switch show system snapshot
    fpc0:
    --------------------------------------------------------------------------
    Valid Junos snapshot found
    Information for snapshot on       usb (/dev/da0s1)
    Creation date: Oct 31 16:02:35 2013
    JUNOS version on snapshot:
      JUNOS  : 13.2-20131030_x_132_x51_exdc.0
    

    Meaning

    The output shows the date and time when the snapshot was created and the packages that are part of the snapshot. The date and time match the time when you created the snapshot.

    You can compare the output of this command to the output of the show system software command to ensure that the snapshot contains the same packages as the software currently running the switch.

    Modified: 2018-02-01