Archiving configurations after a change
In this recipe, we'll make use of a JUNOS event policy that fires whenever a configuration change is committed. It will respond by taking a snapshot of the configuration, and uploading it to a network management station for record-keeping.
Getting ready
In order to complete this recipe, you need access to a JUNOS device and a UNIX-like network management station running an OpenSSH (or equivalent) server.
How to do it…
We're going to locate a directory on the UNIX host where configuration backups will be stored, then configure the JUNOS device with the relevant event policy to respond appropriately. The steps for the recipe are as follows:
- Create a user profile and home directory pair on the UNIX host that we can assign to the JUNOS device for login purposes. The exact steps for creating a user may vary between operating systems, but
adduser
is normally the utility to employ as a superuser (using thesudo
ordoas
tool). Set the password to an appropriate...