Overview of Updating Commit Scripts from a Remote Source
You can update the commit scripts on a device running Junos OS by retrieving a copy of them from a remote machine (which can be another device running Junos OS or a regular networked computer). This eases file management, because it enables you to update a script in a single location and have devices update their copies from that location. Each device continues to use its locally stored commit scripts during commit operations, only updating a script when you issue the appropriate configuration mode command.
For each commit script, you can define a remote location that houses the master copy of the script, by specifying its URL with the source statement at the [edit system scripts commit file filename] hierarchy level. When you then issue the set refresh configuration mode command for a script, the device running Junos OS updates its local copy by retrieving the remote master copy from that URL.
You can also store a copy of a particular script at a remote location other than the master source. This is convenient when, for example, the master source cannot be accessed due to network issues or other problems. When you issue the set refresh-from command for the script, you specify the URL for the remote script as an option to the command.
You can use the set refresh and set refresh-from commands to update either an individual commit script or all enabled commit scripts on the device. When you issue the set refresh or set refresh-from command, the switch, router, or security device immediately attempts to connect to the appropriate remote source for each script. If successful, the device updates the local commit script with the remote source. If a problem occurs, a set of error messages is returned.
Issuing the set refresh or set refresh-from command does not add the refresh and refresh-from statements to the configuration. In other words, the set command behaves differently for these statements than for others: it behaves like an operational mode command by executing an operation, instead of adding a statement to the configuration.
If a device has dual Routing Engines and you want the script to be updated on both Routing Engines, you must include the refresh or refresh-from statements in the configuration of both Routing Engines. The commit synchronize command does not cause the refresh or refresh-from statement to update scripts on both Routing Engines.
The refresh and refresh-from statements are mutually exclusive.
![]() | Caution: We recommend that you do not automate the update function by including the refresh statement as a commit script change element. Even though this might seem like a good way to ensure that the most current commit script is always used, we recommend against it for the following reasons:
|
Hide Navigation Pane
Show Navigation Pane
Download
SHA1
