Back Up and Recover Software with Snapshots
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 create copies of both the software and the configuration running on a device
using the request system snapshot
command. The request
system snapshot
command takes a “snapshot” of the files currently used
to run the device and copies the files onto the alternate solid-state drive (SSD).
The snapshot contains the complete contents of the /soft,
/config, and /root directories, which
include the current and all rollback software images, copies of user data, the
active configuration, the rescue configuration, and content from the
/var directory (except the /var/core,
/var/external, /var/log, and
/var/tmp directories). You can then use this snapshot to
boot the device at the next boot up or as a backup boot option.
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 run on the local Routing Engine and snapshot to the secondary SSD on the local Routing Engine.
Note:Starting in Junos OS Evolved Release 22.4R1, you can take snapshots of both Routing Engines by issuing the
request system snapshot routing-engine both
command.
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 Routing Engine automatically reverts to booting from the secondary SSD, where snapshots are stored. You can then reboot the Routing Engine 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) Routing Engine: