Editing, Saving and (auto)reverting configuration
From Tech-Wiki
More actions
Common Junos configuration-mode commands for reviewing, comparing, committing, rolling back and backing up configuration.
Review configuration
Show the active configuration
show configuration show configuration | display detail
Compare candidate and active configuration
Compare pending changes
show | compare
Compare against an earlier rollback:
Compare with a rollback
show | compare rollback X
Enter configuration mode
Configuration mode
configure
Validate and commit
Check the candidate configuration
commit check
Commit immediately:
Commit
commit
Schedule a commit:
Commit at a specific time
commit at 02:00:00
Show commit history and pending scheduled commits:
Show commit status/history
show system commit
Cancel a pending scheduled commit:
Clear pending commit
clear system commit
Commit confirmed
Useful for remote changes
commit confirmed automatically returns to the previous configuration if the new commit is not explicitly confirmed within the configured period.Commit with automatic rollback protection
commit confirmed
Roll back
Return to a previous candidate configuration
rollback
Load configuration
Load a configuration from a file:
Load an override file
load override /var/tmp/router-config commit
Load configuration from the terminal:
load merge terminal [Type ^D at a new line to end input] ... commit
Back up configuration
Create a system snapshot:
System snapshot
request system snapshot
Save the active configuration:
Save active configuration
run show configuration | save config.txt
Save the candidate configuration:
Save candidate configuration
save config.txt
Archive configuration automatically
set system archival configuration archive-sites ftp://admin:password@host/archives
set system archival configuration transfer interval 1440
set system archival configuration transfer-on-commitProtect archive credentials
The original example includes credentials in an FTP URL. Use the secure transport and credential-handling approach approved for the target environment.