Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Back up and Recover Software with Snapshots

SUMMARY The installation process removes all stored files on the device except for files such as the juniper.conf, SNMP ifIndexes, and SSH files. Therefore, you should back up your current configuration in case you need to return to the current software installation after running the installation program. You can also recover the configuration file and the Junos OS Evolved software, if required.

Understand Snapshots

You can create copies of the software running on a device using the request system snapshot operational mode command. The command takes a “snapshot” of the files currently used to run the device—the complete contents of the /soft and /config directories, which include the running version of Junos OS Evolved, the active configuration, and the rescue configuration—and copies all of these files onto the alternate solid-state drive (SSD). You can then use this snapshot to boot the device at the next boot up or as a backup boot option. The snapshot also contains copies of user data as well as any content from the /root, /var, and /var/home directories.

Note:

We recommend that you take a snapshot after every software upgrade or downgrade.

System snapshots have the following limitations:

  • You cannot use snapshots to move files to any destination outside of the device, including an installed external USB flash drive.

  • Snapshot commands always run on a local Routing Engine (RE) and snapshot to the secondary SSD on the local RE.

Restoring from a snapshot is especially effective as a boot-up option after a disk corruption, as it is the only recovery option that allows you to completely restore the software and configuration in the event of a corrupted disk.

After an upgrade, if the installation fails during early boot, the RE automatically reverts to booting from the secondary SSD, where snapshots are stored. You can then reboot the RE using the snapshot saved on the secondary SSD.

Create a Snapshot on the Secondary SSD and Use It to Recover the Software Installation

To create a snapshot on the secondary SSD (/dev/sdb) of the primary (or only) RE:

  1. Issue the request system snapshot operational mode command.
  2. Use the show system snapshot operational mode command to see the snapshot images available on the REs.
  3. To recover the primary RE using the snapshot, boot the RE from the secondary SSD (disk2).
  4. If the RE has successfully booted from the secondary SSD, after the RE boots up, you see a message similar to the following before the login prompt: