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
request system configuration rescue savesaves the active configuration as the rescue configuration.rollback rescueloads it into the candidate; thencommit.request system configuration rescue deleteremoves 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.
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"
| Statement | Effect |
|---|---|
transfer-on-commit | Sends 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.
| Method | When to choose it |
|---|---|
transfer-on-commit | You want a copy of every change as it happens |
transfer-interval | You 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.
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
| Command | Mode | Effect |
|---|---|---|
request system configuration rescue save | Operational | Saves the current active configuration as the rescue configuration |
rollback rescue | Configuration | Loads the rescue configuration into the candidate |
request system configuration rescue delete | Operational | Deletes 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 configuration | Rollback n | Factory default | |
|---|---|---|---|
| Who creates it | You, with request system configuration rescue save | Junos, at every commit | Juniper, shipped with the device |
| How many | One | Up to 50 (rollback 0 to 49) | One |
| Changes over time | Only when you save it again | Shifts at every commit | Never |
| How to load | rollback rescue | rollback <n> | load factory-default |
| Then | Commit | Commit | Set root password, then commit |
All three only load into the candidate. None of them takes effect until the commit.
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.
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 savesaves the active configuration as the rescue configuration.rollback rescueloads it into the candidate; thencommit.request system configuration rescue deleteremoves it.- Many platforms show a "Rescue configuration is not set" alarm until one is saved.
- Archival lives under
system archival configuration. transfer-on-commitsends after each commit;transfer-intervalsends every 15 to 2880 minutes.archive-sitessets 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 anarchive-sitesdestination.
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.