Configuration Basics · Topic 5 of 5

Configuration Archival and Rescue Configuration

Learn Junos configuration archival with transfer-on-commit and transfer-interval, and how to save and load the rescue configuration for JNCIA-Junos.

  • 4 min
In a nutshell
  • request system configuration rescue save saves the active configuration as the rescue configuration.
  • rollback rescue loads it into the candidate; then commit.
  • request system configuration rescue delete removes it.

What it is

Configuration archival makes a Junos device copy its configuration to a remote server automatically, either after every commit or on a fixed schedule. It gives you an off-box backup without anyone having to remember to take one.

The rescue configuration is a known good configuration you save on the device on purpose. If a change goes badly wrong, you load it with rollback rescue and commit, and you are back to a working state in one step.

Committransfer on commitArchive serverftp or scpKnown good activerescue saveRescue filerollback rescueCandidatecommitWorking device

How it works

Configuration archival

Archival is configured under [edit system archival configuration].

[edit system archival configuration]
user@R1# set transfer-on-commit
user@R1# set archive-sites "scp://[email protected]/configs" password "S3cret"
StatementEffect
transfer-on-commitSends the active configuration to the archive site after each commit
transfer-interval <minutes>Sends the configuration on a schedule, from 15 to 2880 minutes
archive-sites <url>The destination, as an FTP or SCP style URL, with an optional password

transfer-on-commit and transfer-interval are the two ways to trigger a transfer: after each commit, or on a schedule. The archived file name includes the host name and the date and time of the transfer, so files from many devices can share one server directory.

MethodWhen to choose it
transfer-on-commitYou want a copy of every change as it happens
transfer-intervalYou want regular copies and fewer transfers on a busy device

Archival is different from the local rollback history. Rollback keeps up to 50 versions on the device itself, while archival copies the configuration off the device, so it survives a failed storage device or a lost chassis.

Exam tip

A manual backup is still possible at any time. show configuration | save <file> writes the active configuration to a file, and file copy sends that file to a remote server.

The rescue configuration

CommandModeEffect
request system configuration rescue saveOperationalSaves the current active configuration as the rescue configuration
rollback rescueConfigurationLoads the rescue configuration into the candidate
request system configuration rescue deleteOperationalDeletes the rescue configuration

The rescue configuration must include a root password, because loading it is followed by a normal commit. It does not change unless you save a new one, so it does not rotate out like rollback versions do.

user@R1> request system configuration rescue save

user@R1> configure
Entering configuration mode

[edit]
user@R1# rollback rescue
load complete

[edit]
user@R1# commit
commit complete

On many platforms, including SRX and EX devices, Junos raises a system alarm "Rescue configuration is not set" until you save one. show system alarms shows it, and saving a rescue configuration clears it.

Rescue, rollback and factory default compared

Rescue configurationRollback nFactory default
Who creates itYou, with request system configuration rescue saveJunos, at every commitJuniper, shipped with the device
How manyOneUp to 50 (rollback 0 to 49)One
Changes over timeOnly when you save it againShifts at every commitNever
How to loadrollback rescuerollback <n>load factory-default
ThenCommitCommitSet root password, then commit

All three only load into the candidate. None of them takes effect until the commit.

Bad changelost connectivityconsole loginrollback rescuecommitKnown goodconfiguration active

A worked example

An engineer finishes the initial setup of a branch firewall and tests remote access. The engineer then runs request system configuration rescue save, which clears the alarm and stores this working state.

Weeks later a colleague commits a broken change several times over. Instead of working out which rollback number is still good, the engineer connects on the console, runs rollback rescue and commit, and the device is back to its tested baseline.

Common mistakes

Thinking rescue save stores the candidate. It saves the active configuration. Commit first, then save the rescue configuration.

Thinking rollback rescue activates at once. Like every rollback, it only loads the candidate. You must commit.

Confusing rescue with rollback 1. Rollback 1 is just the previous commit and changes every time someone commits. The rescue configuration stays the same until you replace it.

Watch out

Update the rescue configuration after major planned changes. A rescue configuration from before a redesign may restore old addresses and lock you out of the new network.

What to remember for the exam

  • request system configuration rescue save saves the active configuration as the rescue configuration.
  • rollback rescue loads it into the candidate; then commit.
  • request system configuration rescue delete removes it.
  • Many platforms show a "Rescue configuration is not set" alarm until one is saved.
  • Archival lives under system archival configuration.
  • transfer-on-commit sends after each commit; transfer-interval sends every 15 to 2880 minutes.
  • archive-sites sets the FTP or SCP destination.

Check yourself

  • Which command saves the rescue configuration, and in which mode?

    request system configuration rescue save, in operational mode. It saves the active configuration.

  • After rollback rescue, is the rescue configuration running?

    Not yet. It is only in the candidate until you commit.

  • Which archival statement sends the configuration to the server after every commit?

    transfer-on-commit, together with an archive-sites destination.

Topic 5 of 5 in Configuration Basics

Test yourself on Configuration Basics

The full Juniper JNCIA-Junos JN0-106 question bank has 1,155 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.