SRX Services Gateway
SRX Services Gateway

Copying config on Active and backup partition

‎01-29-2019 06:31 AM

Morning guys!

 

I am trying to understand if there is a simple command to copy the running config from one partition to the other and boot the SRX from that partition ?

 

Lets say the Active partition has been corrupted and the SRX booted up using the Backup partition, I would like to restore the config on the Active partition by copying the config file from Backup partition. 

Is this the appropriate command to do that ?

request system snapshot slice altnerate

Or do we have any file copy <Source> <destination> command ?

I am assuming the config resides on /config folder of the active partition and the /altconfig of the backup partition. 

 

Kindly help me understand.

 

Thanking you.

Regards,

Pavan Katakam

7 REPLIES 7
SRX Services Gateway
Solution
Accepted by topic author pavan430
‎01-30-2019 07:26 AM

Re: Copying config on Active and backup partition

[ Edited ]
‎01-29-2019 07:26 AM

/var and /config live on seperate partitions from and are shared by the the primary and backup roots. Therefore there is only one copy.

 

From https://www.juniper.net/documentation/en_US/junos/topics/concept/switch-resilient-dual-root-partitio...:

 

In the resilient dual-root partition scheme, the /var file system is contained in a separate slice (Slice 3) from the root file systems, the /config directory is contained in its own slice (Slice 4), and switches ship from the factory with identical Junos OS images in Slice 1 and Slice 2. The /var file system, which has a greater frequency of reads and writes than the root file systems and is therefore more likely to have corruption issues, is isolated from the root directories and the /config directory. If the switch fails to boot from the active partition, the switch automatically boots from the alternate root partition and triggers an alarm.

 

SRX Services Gateway

Re: Copying config on Active and backup partition

‎01-29-2019 07:36 AM

Thank you Smiley Happy 

 

So I was going through the file copy commands and was trying to understand what this command does:

 

file copy /config/juniper.conf /altconfig/juniper1.conf 

 

What is the /altconfig used for ?

 

Thanking you.

Regards,

Pavan Katakam

SRX Services Gateway

Re: Copying config on Active and backup partition

‎01-29-2019 08:22 AM

Assuming there is only one config location /config for both the parititions, can I test the booting of SRX from backup partition by taking down the active partition ?

 

Is there a command to manually failover to the backup partition ?

 

Thank you

Pavan

SRX Services Gateway

Re: Copying config on Active and backup partition

‎01-29-2019 08:46 AM

There is no command to boot from backup partition. Backup partition is used as a recovery partition and you can not boot manually from it.  If the SRX is unable to boot from the primary Junos OS image, it boots up from the backup Junos OS image in the backup root partition.

 

Please refer this URL to understand how dual-root partitioning works on srx:  https://www.juniper.net/documentation/en_US/junos/topics/concept/security-dual-root-partitioning-sch...

 

 

Thanks,
Nellikka
JNCIE x3 (SEC #321; SP #2839; ENT #790)
Please Mark My Solution Accepted if it Helped, Kudos are Appreciated too!!!
SRX Services Gateway

Re: Copying config on Active and backup partition

[ Edited ]
‎01-29-2019 10:19 AM
Yes, you can perform file copy to a selected node in a cluster too.

Simple file copy from one location to another
&gt;file copy ‹src› ‹dst›
Copy file across cluster devices
› file copy ‹src› node0/1:‹dst›
SRX Services Gateway

Re: Copying config on Active and backup partition

‎01-29-2019 01:10 PM

/altroot is used a mount point for the alternate partition while snapshotting. I don't know what /altconfig is for--maybe someone else does. 

SRX Services Gateway

Re: Copying config on Active and backup partition

‎01-30-2019 07:25 AM

Thank you Smiley Happy