This article summarizes how to update the roll back configuration and OS on the backup partition (/altroot) on Junos devices running version 10.0 and higher image.
To update OS and configurations saved on the backup partition of dual root device, use the “request system snapshot slice alternate” command.
Starting with Junos version 10.0, SRX and J series routers have two roots on the system. These are identical in terms of functionality and each root can store only one Junos image. At any point of time, either partition 1 or partition 2 will be the primary and the other one will be the backup. The role of these partitions as primary and backup are not permanent and they will change their roles after a roll back or Junos upgrade.
Use the following command to find out which partition is primary and which is backup:
root> show system snapshot media internal Information for snapshot on internal (/dev/da0s1a) (backup) Creation date: Apr 18 10:03:44 2011 JUNOS version on snapshot: junos : 10.2R3.10-domestic Information for snapshot on internal (/dev/da0s2a) (primary) Creation date: Apr 29 10:04:42 2011 JUNOS version on snapshot: junos : 10.4R3.4-domestic
Now, inorder to take a backup of the current root into the other /altroot root (on the same media) use the “request system snapshot slice alternate” command as follows:
root@host> show version Hostname: juniper Model: srx100-lm JUNOS Software Release [10.4R3.4] root@juniper> request system snapshot slice alternate Formatting alternate root (/dev/da0s2a)... Copying '/dev/da0s1a' to '/dev/da0s2a' .. (this may take a few minutes) The following filesystems were archived: / root@juniper> show system snapshot media internal Information for snapshot on internal (/dev/da0s1a) (primary) Creation date: Apr 29 10:04:42 2011 JUNOS version on snapshot: junos : 10.4R3.4-domestic Information for snapshot on internal (/dev/da0s2a) (backup) Creation date: Apr 29 10:10:22 2011 JUNOS version on snapshot: junos : 10.4R3.4-domestic
Hence the command request system snapshot slice alternate is used to copy the contents of primary partition onto secondary backup partition on the same media. It is worth mentioning that request system snapshot media USB is used to make similar copy of one media onto another media, which is USB. In the above example we discussed dual root, issuing the command “request system snapshot media USB” will duplicate the entire internal media (both root partitions, configurations and everything else) onto the external USB drive.