01Collection commands
set cli screen-length 0
set cli screen-width 0
show version
show configuration | display omit | display omit also includes the parts marked to be hidden from the normal listing. To look up or reapply sections, show configuration | display set shows the same configuration as set commands, one line per item.
02Local rollback is not a backup
Junos keeps the latest committed configurations (rollback 0 is the current one, rollback 1 the previous one, and so on). That fixes the mistake made a moment ago, but it lives on the same disk as the device: if the router is replaced or the disk fails, the history goes with it. An external backup is still needed.
It is also worth keeping a rescue configuration on the device, which Junos uses to return to a known state:
request system configuration rescue save 03Restoring safely
With the backup file copied to the device (for example to /var/tmp/), replace the candidate configuration, review it and commit with a timer:
configure
load override /var/tmp/backup.conf
show | compare
commit check
commit confirmed 5 commit confirmed 5 applies the configuration and rolls it back on its own after 5 minutes unless you run commit again. If the restore cuts off your access, the device returns to its previous state without anyone having to go there.
04Passwords in the file
By default Nexus keeps the full configuration, so everything can be restored. If the installation is set to strip passwords from backups, Nexus hides SNMP communities, users' SSH keys and encrypted passwords ($1$, $6$, $9$). Without that setting, the file keeps everything and load override restores the users too.
05Automatic collection with Nexus
Nexus connects over SSH or Telnet, adjusts the CLI, stores the version and the configuration and creates a new version only when the configuration changes. The general restore walkthrough is in How to restore a configuration from backup.