Supported Platforms
Related Documentation
- ACX, EX, M, MX, SRX, T Series
- Using a Master Source Location for a Script
- Using an Alternate Source Location for a Script
Overview of Updating Scripts from a Remote Source
You can update the scripts on a device running Junos OS by retrieving a copy from a remote machine (which can be another device running Junos OS or a regular networked computer). This eases file management, because you can make changes to the master script in a single location and then update the copy on each device where the script is currently enabled. Each device continues to use its locally stored scripts, only updating a script when you issue the appropriate operational or configuration mode command.
For each script, you can configure the source statement and a URL at the hierarchy level where you configured the script to define the remote location that houses the master copy of that script. 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. To refresh a single script or multiple scripts from the remote location, you issue the set refresh-from configuration mode command at the appropriate hierarchy level and specify the URL. You can also refresh a single script from a remote location using the request system scripts refresh-from operational mode command.
You can use the set refresh and set refresh-from commands to update either an individual script or multiple scripts of a given type 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 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. Thus, these commands behave like operational mode commands by executing an operation, instead of adding a statement to the configuration. The refresh and refresh-from statements are mutually exclusive.
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.
![]() | Caution: For commit scripts, 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:
|
Related Documentation
- ACX, EX, M, MX, SRX, T Series
- Using a Master Source Location for a Script
- Using an Alternate Source Location for a Script
Published: 2013-03-05
Supported Platforms
Related Documentation
- ACX, EX, M, MX, SRX, T Series
- Using a Master Source Location for a Script
- Using an Alternate Source Location for a Script