Description

A snapshot is a copy of the configuration and operating system. The request system snapshot command will make a copy to the alternate/secondary media. This can help recover the current media (compact flash) from a file corruption using the alternate media (disk).

Important : All configuration changes made after the snapshot is taken will be lost. It is wise to make a snapshot after every major change of the configuration or version.

Symptoms

When there is a file corruption or media failure, what is the quickest way to recover the Routing Engine?

Solution

The command request system snapshot backs up the currently running and active file system partitions to standby partitions on the alternative media. Specifically, 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 compact flash drive, and the /altroot and /altconfig file systems are on the router's hard drive (for most Routing Engine models).

The device is currently running from compact flash:

user@Router> start shell
% sysctl -w machdep.currbootdev
machdep.currbootdev: compact-flash

A snapshot is saved in the secondary media (disk):

user@Router> show system snapshot
Information for snapshot on hard-disk (ad1s1)
Creation date: Oct 29 14:05:03 2014
JUNOS version on snapshot:
jbase : 12.3R7.7
jcrypto: 12.3R7.7
jdocs : 12.3R7.7
jkernel: 12.3R7.7
jpfe : M7i-12.3R7.7
jpfe-common: 12.3R7.7
jplatform: 12.3R7.7
jroute : 12.3R7.7
jruntime: 12.3R7.7

To recover the Routing Engine using the latest snapshot, execute the following command:

user@Router> request system reboot media disk
Reboot the system ? [yes,no] (no) yes

This will make the Routing Engine boot from the secondary media (hard disk) using the partitions saved at the moment the request system snapshot command was executed.

--- NOTICE: System is running on alternate media device (/dev/ad1s1a).
---
user@Router> start shell
% sysctl -w machdep.currbootdev
machdep.currbootdev: disk1

Once the Routing Engine boots from the hard disk, confirm that the router is working as expected. Running the request system snapshot command again from the disk will overwrite the contents of the primary media (compact flash). Then reboot the router so that it will boot from the primary media (compact flash).

Related Information