Rollback Commands

rollback

Syntax

rollback

Context

admin

config>system

Description

This command enables the context to configure rollback command parameters.

Default

n/a

compare

Syntax

compare [to source2]

compare source1 to source2

Context

admin

admin>rollback

config>xx (where xx is any sub-branch at any level below config, but not at the config context itself)

Description

This command compares two configuration files. If the compare command is entered with no parameters defined, it compares the active configuration to the most recent rollback file. If the command is entered with the source2 parameter defined, it compares the active configuration to the specified file. If the command is entered with both source parameters defined, it compares the first specified file to the second specified file.

Note:

In the CLI, the source1 and source2 parameters are called checkpoint1 and checkpoint2 in the admin>rollback context for this command. For simplicity, this command description uses source1 and source2 for all contexts.

The compare command with no parameters can only be used in the admin>rollback context. The compare to source2 command can only be used in the admin>rollback or config>xx context. In the admin context, both source parameters must be specified.

Caution:

A compare operation does not check authorization of each line of output. Permission to execute the compare command from the admin branch should only be granted to users who are allowed to view the entire system configuration.

The defaults for the source parameters are context-dependent and differ based on the branch in which the command is executed.

Default

admin context: no defaults (source1 and source2 must be specified)

admin>rollback context: source1 = active-cfg, source2 = latest-rb

config>xx context: source1 = active-cfg, no default for source2

Parameters

source1, source2

the configuration files to compare

Values

active-cfg

the active operational system configuration

rescue

the rollback rescue file from the configured rescue location

latest-rb

the most recent rollback checkpoint file from the configured rollback location, with the suffix *.rb

checkpoint-id

The ID value (x) of a specific rollback checkpoint file from the configured rollback location with the suffix *.rb.x.

The default range is 1 to 9 but the maximum value depends on the local-max-checkpoints and remote-max-checkpoints configurations.

delete

Syntax

delete checkpoint-rescue

Context

admin>rollback

Description

This command deletes a rollback checkpoint file and decrements the suffix ID numbers of all older rollback checkpoint files.

If the config>redundancy>rollback-sync command is enabled, deleting a rollback checkpoint file also deletes the backup file and decrements the suffix ID numbers on the standby CSM.

Default

n/a

Parameters

checkpoint-rescue

identifies a rollback checkpoint or rescue file to delete

Values

rescue

the rollback rescue file from the configured rescue location

latest-rb

the most recent rollback checkpoint file from the configured rollback location, with the suffix *.rb

checkpoint-id

The ID value (x) of a specific rollback checkpoint file from the configured rollback location with the suffix *.rb.x.

The default range is 1 to 9 but the maximum value depends on the local-max-checkpoints and remote-max-checkpoints configurations.

revert

Syntax

revert checkpoint-rescue[now]

Context

admin>rollback

Description

This command initiates a CLI configuration rollback revert operation that returns the configuration state of the node to a previously saved checkpoint file or rescue file. The rollback reversion minimizes impacts to running services. Configuration parameters that have changed since the last rollback checkpoint file was created, or items on which changed configurations have dependencies, are first reset to their default values and then restored to their previous values from the rollback checkpoint file.

Performing a configuration reversion can be briefly service-impacting in changed areas. There are no service impacts to configuration areas that did not change since the rollback checkpoint file was created.

Default

n/a

Parameters

checkpoint-rescue

identifies the rollback checkpoint or rescue file to revert to

Values

rescue

the rollback rescue file from the configured rescue location

latest-rb

the most recent rollback checkpoint file from the configured rollback location, with the suffix *.rb

checkpoint-id

The ID value (x) of a specific rollback checkpoint file from the configured rollback location with the suffix *.rb.x.

The default range is 1 to 9 but the maximum value depends on the local-max-checkpoints and remote-max-checkpoints configurations.

now

forces a rollback reversion without prompting for confirmation

save

Syntax

save [comment comment] [rescue]

Context

admin>rollback

Description

This command saves the current operational configuration as a rollback checkpoint file at the configured rollback location, using the filename specified by the rollback-location command, with the suffix *.rb. The suffixes of all previously saved rollback checkpoint files are automatically incremented by one (*.rb becomes *.rb.1, *.rb.1 becomes *.rb.2, and so on).

By default, there can be a maximum of 10 rollback checkpoint files, the latest with suffix *.rb and nine older files with suffixes *.rb.1 through *.rb.9. If the maximum number of checkpoint files is reached and a new one is saved, the oldest checkpoint file is deleted. The maximum number of rollback checkpoint files that can be saved can be configured with the local-max-checkpoints and remote-max-checkpoints commands.

If the rescue keyword is used, this command saves the current operational configuration as a rescue rollback file at the location and with the filename specified by the rescue-location command. The rescue file uses the suffix *.rc. There can be only one rescue file saved at a time. Saving a new rescue file deletes and replaces any existing rescue file.

A valid rollback checkpoint and rescue location must be configured with the rollback-location and rescue-location commands before saving a checkpoint or rescue file.

Default

n/a

Parameters

comment

a string up to 255 characters in length describing the associated rollback checkpoint file

rescue

saves the current operational configuration as a rollback rescue file with the suffix *.rc

view

Syntax

view [checkpoint-rescue]

Context

admin>rollback

Description

This command displays the configuration settings saved in a rollback checkpoint or rescue file, or the active operational system configuration.

Default

latest-rb

Parameters

checkpoint-rescue

identifies the configuration file to view

Values

rescue

the rollback rescue file from the configured rescue location

latest-rb

the most recent rollback checkpoint file from the configured rollback location, with the suffix *.rb

checkpoint-id

The ID value (x) of a specific rollback checkpoint file from the configured rollback location with the suffix *.rb.x.

The default range is 1 to 9 but the maximum value depends on the local-max-checkpoints and remote-max-checkpoints configurations.

local-max-checkpoints

Syntax

local-max-checkpoints [number]

no local-max-checkpoints

Context

config>system>rollback

Description

This command configures the maximum number of rollback checkpoint files that can be saved to the local compact flash.

When the maximum number of files are saved, the oldest rollback checkpoint file has an ID value one less than the configured maximum, because one rollback checkpoint file is always the latest file and does not have an ID number. For example, if you configure the maximum number of checkpoints as 50, after performing 50 rollback save commands, there is a rollback checkpoint file with extension *.rb, and 49 older files with extension *.rb.1 to *.rb.49.

The no form of this command resets the maximum value to the default.

Default

10

Parameters

number

the maximum number of rollback checkpoint files

Values

1 to 50

remote-max-checkpoints

Syntax

remote-max-checkpoints [number]

no remote-max-checkpoints

Context

config>system>rollback

Description

This command configures the maximum number of rollback checkpoint files that can be saved on a remote device.

When the maximum number of files are saved, the oldest rollback checkpoint file has an ID value one less than the configured maximum, because one rollback checkpoint file is always the latest file and does not have an ID number. For example, if you configure the maximum number of checkpoints as 50, after performing 50 rollback save commands, there is a latest rollback checkpoint file with extension *.rb, and 49 older files with extension *.rb.1 to *.rb.49.

The no form of this command resets the maximum value to the default.

Default

10

Parameters

number

the maximum number of rollback checkpoint files

Values

1 to 200

rescue-location

Syntax

[no] rescue-location file-url|rescue filename

Context

config>system>rollback

Description

This command configures the location and generic filename of the rollback rescue configuration file.

A rescue file can be saved locally on the compact flash or on a remote device. The file URL must not include a filename extension. The suffix for the rollback rescue configuration file is *.rc and is automatically appended when the file is saved.

A valid rollback rescue location must be configured before a rollback save command is executed.

Default

no rescue-location

Parameters

file-url

the local or remote file path for the rollback rescue configuration file (see Table: URL Types and Syntax for parameter descriptions)

rescue filename

the generic filename for rollback rescue configuration files

rollback-location

Syntax

[no] rollback-location file-url| rollback filename

Context

config>system>rollback

Description

This command configures the location and generic filename of rollback checkpoint files. Files can be saved locally on the compact flash or on a remote device.

The file-url or filename must not include a filename extension. The suffixes for rollback checkpoint files are *.rb and *.rb.1 to *.rb.x, and are automatically appended when the file is saved.

A valid rollback checkpoint location must be configured before a rollback save command is executed.

Default

no rollback-location

Parameters

file-url

the local or remote file path for rollback checkpoint files (see Table: URL Types and Syntax for parameter descriptions)

Values

local-url

[cflash-id/][file-path] 200 chars max, including cflash-id directory length 99 chars max each

remote-url

[{ftp://}login:pswd@ remote-locn/][file-path]

255 chars max directory length 99 chars max each

remote-locn

[hostname | ipv4-address | ipv6-address ]

ipv4-address

a.b.c.d

ipv6-address

x:x:x:x:x:x:x:x[-interface]

x:x:x:x:x:x:d.d.d.d[-interface]

x - [0..FFFF]H

d - [0..255]D

interface: the interface name, 32 chars max, mandatory for link local addresses

cflash-id

cf3:|cf3-A:|cf3-B:

rollback filename

the generic filename for rollback checkpoint files

rollback-sync

Syntax

rollback-sync

Context

admin>redundancy

Description

This command copies all existing rollback checkpoint files from the active CSM compact flash to the standby CSM compact flash on a 7705 SAR-8 Shelf V2 or 7705 SAR-18. You can also enable the system to save an automatic backup of each new rollback checkpoint file with the command in the config>redundancy context.

Rollback checkpoint files can only be backed up from local sources and only by using the two dedicated rollback-sync commands. The synchronize commands in the config>redundancy and admin>redundancy contexts do not apply to rollback checkpoint files.

Default

n/a

rollback-sync

Syntax

[no] rollback-sync

Context

config>redundancy

Description

This command enables automatic synchronization of locally saved rollback checkpoint files between the active CSM and standby CSM.

When automatic rollback synchronization is enabled, a rollback save causes the new checkpoint file to be saved on both the active and standby CSMs if the rollback location is a local location. The suffixes of all older checkpoint files on both active and standby CSMs are incremented by one. Automatic synchronization only causes new rollback checkpoint files to be copied to both CSMs. Any rollback checkpoint files that were created before rollback-sync was enabled are not copied to the standby CSM. You can manually back up all files using the command in the admin>redundancy context.

Rollback checkpoint files can only be backed up from local sources and only by using the two dedicated rollback-sync commands. The synchronize commands in the config>redundancy and admin>redundancy contexts do not apply to rollback checkpoint files.

The no form of this command disables automatic synchronization of new rollback checkpoint files.

Default

no rollback-sync