You can refresh local commit scripts with remote commit scripts using the refresh and the refresh-from statements. You specify the remote commit script’s URL when issuing refresh-from statement. When you issue the refresh statement, the router uses the commit script URL specified by the source statement. For more information on the source statement and defining a master commit script source URL, see Specifying a Remote Commit Script Source URL.
Once the refresh or the refresh-from statement is issued, the router attempts to connect to the remote commit script source and retrieve the remote commit script. If successful, the router updates the local commit script. If a problem occurs, a set of error messages is returned.
The refresh operation occurs as soon as you add the refresh or refresh-from statement to the configuration. In this way, these statements behave like operational mode commands. Further, these statements are not permanently recorded in the configuration file.
If a platform has dual Routing Engines, you need to refresh the commit scripts on both Routing Engines. The commit synchronize command does not refresh the commit scripts between Routing Engines.
![]() |
Caution: We recommend that you do not automate the refresh 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 automating the refresh function for the following reasons:
|
To refresh a single commit script, include the refresh-from statement at the [edit system scripts commit file filename] hierarchy level:
- [edit system scripts commit file filename]
-
refresh-from url;
Specify the source as an HTTP URL, FTP URL, or Secure Copy Protocol (SCP)–style remote file specification.
The refresh operation occurs as soon as you include the refresh-from statement in the configuration and issue the commit command. The refresh-from statement is not carried in the configuration file. In this way, it behaves like an operational mode command.
To refresh all scripts from a specified source, Include the refresh-from statement at the [edit system scripts commit] hierarchy level:
- [edit system scripts commit]
-
refresh-from url;
Once the statement has been issued, the router will attempt to connect to the commit script source and retrieve the remote commit script files.
To refresh a single commit script, issue the refresh statement at the [edit system scripts commit file filename] hierarchy level:
[edit system scripts commit]
set file filename refresh;
[edit system scripts commit file filename]
source http://my.example.com/pub/scripts/iso.xsl;
If the commit script is written in XSLT, using the .xsl file extension is optional, but highly recommended. If the commit script is written in SLAX, the file must include the .slax file extension.
Once the statement has been issued, the router attempts to connect to the commit script source and retrieve the remote commit script file.
To refresh all scripts from their sources issue the refresh statement at the [edit system scripts commit] hierarchy level:
- [edit system scripts commit]
- set refresh
Once the statement has been issued, the router attempts to connect to the commit script source and retrieve all remote commit script files.