Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Example: Taking a Snapshot of the Software and Configuration

This example includes six scenarios in which you can take a snapshot of the currently running software and configuration on an ACX Series router, prior to the upgrade of an image or to remedy a bad image, thereby preventing the bad image from rendering the system useless.

Requirements

This example uses the following hardware and software components:

  • One ACX Series router
  • Junos OS Release 12.2 or later

Overview

In this example, the request system snapshot command is used to take a copy of the currently running software and configuration on another media—for example, a universal serial bus (USB) storage device, the active slice (da0s1 or da0s2) of a dual-root partitioned router, or the alternate slice (da0s1 or da0s2) of a dual-root partitioned router. A snapshot to another media ensures that the device can boot from the other media in case the system does not boot up from the current image.

Caution: After you run the request system snapshot command, you cannot return to the previous version of the software, because the running and backup copies of the software are identical.

Taking a Snapshot

Step-by-Step Procedure

Scenario: To take a snapshot from a NAND flash device slice to a USB storage device:

  1. Boot up the router from the NAND flash device and make sure that a formatted USB storage device is plugged in to the router’s USB port. The USB storage device must be formatted for the root (/) and /config directories.
  2. Issue the request system snapshot command.
    user@host> request system snapshot
    Verifying compatibility of destination media partitions...
    Running newfs (254MB) on usb media  / partition (da1s1a)...
    Running newfs (47MB) on usb media  /config partition (da1s1e)...
    Copying '/dev/da0s2a' to '/dev/da1s1a' .. (this may take a few minutes)
    Copying '/dev/da0s2e' to '/dev/da1s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    The root (/) and /config directories from the currently mounted NAND flash slice are copied to the USB storage device.

Step-by-Step Procedure

Scenario: To take a snapshot from a NAND flash device slice to a USB storage device with formatting:

  1. Boot up the router from the NAND flash device and make sure that a USB storage device is plugged in to the router’s USB port.

    Note: Formatting a USB storage device deletes all the data on the USB storage device.

  2. Issue the request system snapshot partition command.
    user@host> request system snapshot partition
    clearing current label...
    Partitioning usb media (da1) ...
    Partitions on snapshot:
    
      		Partition  Mountpoint  Size    Snapshot argument
         		 a      /           312MB   root-size
         		 e      /config     47MB    config-size
         		 f      /var        620MB   var-size
    Running newfs (312MB) on usb media  / partition (da1s1a)...
    Running newfs (47MB) on usb media  /config partition (da1s1e)...
    Running newfs (620MB) on usb media  /var partition (da1s1f)...
    Copying '/dev/da0s2a' to '/dev/da1s1a' .. (this may take a few minutes)
    Copying '/dev/da0s2e' to '/dev/da1s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    After the USB storage device is formatted, the root (/) and /config directories from the currently mounted NAND flash slice are copied to the USB storage device.

Step-by-Step Procedure

Scenario: To take a snapshot from the active slice of the NAND flash device to the alternate slice:

  1. Boot up the router from the NAND flash device.
  2. Issue the request system snapshot slice alternate command.
    user@host> request system snapshot slice alternate
    Verifying compatibility of destination media partitions...
    Running newfs (439MB) on internal media  / partition (da0s1a)...
    Running newfs (46MB) on internal media  /config partition (da0s1e)...
    Copying '/dev/da0s2a' to '/dev/da0s1a' .. (this may take a few minutes)
    Copying '/dev/da0s2e' to '/dev/da0s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    The root (/) and /config directories from the currently mounted NAND flash slice are copied to the other slice.

Step-by-Step Procedure

Scenario: To take a snapshot from an active slice of the NAND flash device to the alternate slice after partitioning:

  1. Boot up the router from the NAND flash device.
  2. Issue the request system snapshot partition slice alternate command.
    user@host> request system snapshot partition slice alternate
    Verifying compatibility of destination media partitions...
    Running newfs (439MB) on internal media  / partition (da0s1a)...
    Running newfs (46MB) on internal media  /config partition (da0s1e)...
    Copying '/dev/da0s2a' to '/dev/da0s1a' .. (this may take a few minutes)
    Copying '/dev/da0s2e' to '/dev/da0s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    The BSD label (disk partitioning information) for the active flash slice is installed and then the root (/) and /config directories from the currently mounted NAND flash slice are copied to the other slice.

Step-by-Step Procedure

Scenario: To take a snapshot from a USB storage device to the active slice of the NAND flash device:

  1. Boot up the router from a USB storage device containing the required Junos OS image.
  2. Issue the request system snapshot command.
    user@host> request system snapshot
    Verifying compatibility of destination media partitions...
    Running newfs (439MB) on internal media  / partition (da0s1a)...
    Running newfs (46MB) on internal media  /config partition (da0s1e)...
    Copying '/dev/da1s1a' to '/dev/da0s1a' .. (this may take a few minutes)
    Copying '/dev/da1s1e' to '/dev/da0s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    The root (/) and /config directories from the USB storage device are copied to the active NAND flash slice.

Step-by-Step Procedure

Scenario: To take a snapshot from a USB storage device to the active slice of the NAND flash device after partitioning:

  1. Boot up the router from a USB storage device containing the required Junos OS image.
  2. Issue the request system snapshot partition command.
    user@host> request system snapshot partition
    Verifying compatibility of destination media partitions...
    Running newfs (439MB) on internal media  / partition (da0s1a)...
    Running newfs (46MB) on internal media  /config partition (da0s1e)...
    Copying '/dev/da1s1a' to '/dev/da0s1a' .. (this may take a few minutes)
    Copying '/dev/da1s1e' to '/dev/da0s1e' .. (this may take a few minutes)
    The following filesystems were archived: / /config
    

    The BSD label (disk partitioning information) for the active flash slice is installed and then the root (/) and /config directories from the USB storage device are copied to the active NAND flash slice.

Published: 2013-01-11