File Mirroring

This chapter details the File mirroring feature, which automatically copies files and directories from an active Route Processor (RP) to a standby RP or RSP. It eliminates manual intervention for file synchronization, ensuring redundancy.

File mirroring

File mirroring is a file management feature that
  • enables the router to copy files or directories automatically from /harddisk:/mirror location in active RP to /harddisk:/mirror location in standby RP or RSP without user intervention or EEM scripts, and

  • enables the feature by using mirror enable and mirror enable checksum options.

Table 1. Feature History Table

Feature Name

Release Information

Description

File mirroring

Release 7.0.14

This feature enables the router to copy files and directories automatically from an active RP to a standby RP thus eliminating the manual intervention or the use of EEM scripts.

You can use these commands to enable the file mirroring feature:

  • mirror enable - The /harddisk:/mirror directory is created by default, but file mirroring functionality is only enabled by executing the mirror enable command from configuration terminal. Status of the mirrored files can be viewed with show mirror status command.

  • mirror enable checksum - The mirror enable checksum command enables MD5 checksum across active to standby RP to check integrity of the files. This command is optional.

Restrictions for file mirroring

These restrictions apply to file mirroring:

  • Supported only on Dual RP systems.

  • Supports syncing only from active to standby RP. If files are copied into standby /harddisk:/mirror location, it won’t be synced to active RP.

  • A slight delay is observed in show mirror command output when mirror checksum configuration is enabled.

  • Not supported on multichassis systems.

Configure file mirroring

Use these steps to configure file mirroring:

Before you begin

File mirroring must be enabled explicitly on the router. It is not enabled by default.

Procedure


Step 1

Ensure mirroring is enabled.

Example:

Router#show run mirror

Thu Jun 25 10:12:17.303 UTC
mirror enable
mirror checksum

Step 2

Copy running configuration to harddisk:/mirror location.

Example:

Router#copy running-config harddisk:/mirror/run_config
Wed Jul  8 10:25:51.064 PDT
Destination file name (control-c to abort): [/mirror/run_config]?
Building configuration..
32691 lines built in 2 seconds (16345)lines/sec
[OK]

Step 3

Verify the syncing of file copied to mirror directory, use the show mirror command.

Example:

Router#show mirror 
Wed Jul  8 10:31:21.644 PDT
% Mirror rsync is using checksum, this show command may take several minutes if you have many files. Use Ctrl+C to abort
MIRROR DIR: /harddisk:/mirror/
% Last sync of this dir ended at Wed Jul  8 10:31:11 2020
Location   |Mirrored |MD5 Checksum                     |Modification Time
--------------------------------------------------------------------------
run_config |yes      |76fc1b906bec4fe08ecda0c93f6c7815 |Wed Jul  8 10:25:56 2020 
Table 2. Identify issues

If..

Then..

the checksum is disabled

use the show mirror command to display the following output:
Router#show mirror
Wed Jul 8 10:39:09.646 PDT
MIRROR DIR: /harddisk:/mirror/
% Last sync of this dir ended at Wed Jul  8 10:31:11 2020
Location   |Mirrored |Modification Time 
-----------------------------------------
run_config |yes         |Wed Jul  8 10:25:56 2020 

there is a mismatch during the syncing process

use show mirror mismatch command to verify:
Router# show mirror mismatch
Wed Jul  8 10:31:21.644 PDT
 MIRROR DIR: /harddisk:/mirror/
 % Last sync of this dir ended at Wed Jul  8 10:31:11 2020 
 Location  |Mismatch Reason     |Action Needed 
------------------------------------------------
 test.txt  |newly created item. |send to standby