Technical Documentation

Using JUNOS Software to Configure a Router or Switch to Transfer Its Configuration to an Archive Site

You can configure a router or switch to transfer its configuration to an archive file periodically. Tasks to configure the configuration transfer to an archive site are:

  1. Configuring the Router or Switch to Transfer Its Currently Active Configuration to an Archive
  2. Configuring the Transfer Interval for Periodic Transfer of the Active Configuration to an Archive Site
  3. Configuring Transfer of the Current Active Configuration When a Configuration Is Committed
  4. Configuring Archive Sites for Transfer of Active Configuration Files

Configuring the Router or Switch to Transfer Its Currently Active Configuration to an Archive

If you want to back up your device’s current configuration to an archive site, you can configure the router or switch to transfer its currently active configuration by FTP periodically or after each commit.

To configure the router or switch to transfer its currently active configuration to an archive site, include statements at the [edit system archival configuration] hierarchy level:

[edit system archival configuration]archive-sites {ftp://username<:password>@host-address<:port>/url-path;scp://username<:password>@host-address<:port>/url-path;}transfer-interval interval;transfer-on-commit;

Note: When specifying a URL in a JUNOS Software statement using an IPv6 host address, you must enclose the entire URL in quotation marks (" ") and enclose the IPv6 host address in brackets ([ ]). For example, “ftp://username<:password>@[ipv6-host-address]<:port>/url-path

Configuring the Transfer Interval for Periodic Transfer of the Active Configuration to an Archive Site

To configure the router or switch to periodically transfer its currently active configuration to an archive site, include the transfer-interval statement at the [edit system archival configuration] hierarchy level:

[edit system archival configuration]transfer-interval interval;

The interval is a period of time ranging from 15 through 2880 minutes.

Configuring Transfer of the Current Active Configuration When a Configuration Is Committed

To configure the router or switch to transfer its currently active configuration to an archive site each time you commit a candidate configuration, include the transfer-on-commit statement at the [edit system archival configuration] hierarchy level:

[edit system archival configuration]transfer-on-commit;

Note: When specifying a URL in a JUNOS Software statement using an IPv6 host address, you must enclose the entire URL in quotation marks (" ") and enclose the IPv6 host address in brackets ([ ]). For example, “scp://username<:password>@[ipv6-host-address]<:port>/url-path

Configuring Archive Sites for Transfer of Active Configuration Files

When you configure the router or switch to transfer its configuration files, you specify an archive site to which the files are transferred. If you specify more than one archive site, the router or switch attempts to transfer files to the first archive site in the list, moving to the next site only if the transfer fails.

When you use the archive-sites statement, you can specify a destination as a Hypertext Transfer Protocol (HTTP) URL, FTP URL, or secure copy (SCP)-style remote file specification. The URL type file:// is also supported.

To configure the archive site, include the archive-sites statement at the [edit system archival configuration] hierarchy level:

[edit system archival configuration]archive-sites {ftp://username@host:<port>url-path password password;http://username@host:<port>url-path password password;scp://username@host:<port>url-path password password;file://<path>/<filename>;}

Note: When specifying a URL in a JUNOS Software statement using an IPv6 host address, you must enclose the entire URL in quotation marks (" ") and enclose the IPv6 host address in brackets ([ ]). For example, “scp://username<:password>@[ipv6-host-address]<:port>/url-path

When you specify the archive site, do not add a forward slash (/) to the end of the URL. The format for the destination filename is as follows:

<router-name>_juniper.conf[.gz]_YYYYMMDD_HHMMSS

Note: The time included in the destination filename is always in Coordinated Universal Time (UTC) regardless of whether the time on the router is configured as UTC or the local time zone. The default time zone on the router or switch is UTC.


Published: 2010-04-26