configuring archival picture

Configuring archival

At this time we will take a short look at the topic „Archival“ as part of „Device Infrastructure“.

JunOS can automatically copy the current configuration to a storage location. This could be triggered by a time interval or commit change.

In JunOS 10.4 are only FTP and SCP protocols are available. Starting with JunOS 12.4 there a more options available like local copy, HTTP and passive FTP. Beside IPv4 you could also use IPv6 host addresses as destinations.

You start configuring archival under system hierarchy. You must specify the protocol, username, directory and password which should be used.

Syntax looks like this:

systems {
    archival {
        configuration {
            archive-sites {
                "ftp://<username>:<password>@<host>:<port>/<url-path>";
                "scp://<username>:<password>@<host>:<port>/<url-path>";
            }
            transfer-interval <interval>;
            transfer-on-commit;
        }
    }
}

The notation is <Protocol>://<Username>[:Password]@<Host IPv4/IPv6>:<TCP Port>/URL-Path” for example “scp://backup@10.0.0.1:22/home/router-configs/”.

You can specify a time interval in minutes with the option “transfer-interval” in which the configuration gets automatically copied. The range could be 15 till 2880 minutes.

Also you could add the option “transfer-on-commit” to get copy after every commit change.

If the transfer fails, you will see the message “Apr  17 12:41:42  router logger: transfer-file failed to transfer /var/transfer/config/router_juniper.conf.gz_20130417_124059” in your messages.

If this happen, check the connectivity to your scp/ftp server in inet.0 and also username and password settings. You can manually verify the operation also from shell, for e.g. scp :

admin@router> start shell
% scp /config/juniper.conf.gz admin@10.1.1.1:/home/backup/
ssh: connect to host 10.1.1.1 port 22: Connection refused
lost connection
%

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.