Updating an Op Script from an Alternate Location

In addition to updating an op script from the master source defined by the source statement at the [edit system scripts op file filename] hierarchy level, you also can update a script from an alternate location. This is convenient when, for example, the master source cannot be accessed due to network issues or other problems. To update a single op script from the alternate source, issue the set refresh-from command at the [edit system scripts op file filename] hierarchy level, specifying the location of the remote file:

[edit system scripts op file filename]user@host# set refresh-from url

To update all enabled op scripts from the alternate source, issue the set refresh-from command at the [edit system scripts op] hierarchy level, specifying the location of the remote directory that houses the scripts:

[edit system scripts op]user@host# set refresh-from url

At both hierarchy levels:

url—URL of the remote op script or directory. Specify the source as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (scp)-style remote file specification.

When you issue the set refresh-from command, the switch, router, or security device attempts to connect to the machine that houses the master source for the script files and retrieve a copy of each file. The master copy overwrites the script stored in the local op scripts directory. If a master source is not defined for a script, that script is not updated and a warning is issued.

The update operation occurs as soon as you issue the set refresh-from command. The refresh-from statement is not added to the configuration. In other words, for this statement, the set command behaves like an operational mode command, 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 issue the set refresh-from command on each Routing Engine separately. The commit synchronize command does not cause the refresh-from statement to update scripts on both Routing Engines.