Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Personality File for Easy Switch Replacement

 

When a switch in a data center network goes down because of a hardware failure, replacing that switch can be time-consuming and error-prone, because you have to ensure that the crucial elements that you had running on the downed switch are exactly replicated on the new switch. To save time and to avoid errors in configuration and state when you replace a switch, create a “personality” file for your current switch while the switch is still up and save that personality file on a remote server. The “personality” of a switch could include (but is not limited to) its running configuration, SNMP indices, and installed scripts and packages. If the current switch goes down, retrieve the personality file from the server, install it on a new switch, and then bring that new switch online in place of the downed switch.

This topic covers:

Contents of Personality Files

A personality file captures the following data from your current switch:

  • /config—Latest configuration file

  • /var/db—SNMP indexes

  • /var/db—Scripts (for example, SLAX scripts)

  • /var/db/certs—Keys and certificates (for example, OVSDB keys and certificates)

  • junos-install packages and any additional install packages, such as those for VXLAN/OVSDB

In addition to the preceding standard captured data, you can specify one or more user-defined directories to be included in the personality file—for example, you might include some scripts that are saved on the switch in a particular directory.

Generating a Personality File

Before you generate the personality file on your current switch: Ensure that you have identified a remote server location where you will store the personality file and that the server has an IP address that is reachable from your network.

To generate the personality file on your current switch:

  1. 1. If you want to include user-defined items in the personality file, execute the following command from the configuration mode:

    where personality-file-list-of-directories is your specified list of directories, with directory names separated from one another by a space.

    Example:

    where terms dir1, dir2, and dir3 are your user-defined directories.

  2. Generate the personality file by executing the following operational-mode command:

    where

    • personality-file-name is the name of the tarball to be created and saved. We recommend that you use a name of the format device-name-personality-file.tar.gz:

      where

      • device-name is the name of the switch for which you are generating the personality file.

    • protocol is the type of file transfer protocol (for example, scp, tftp, or ftp) to be used to transfer the personality tarball to the remote server.

    • destination-server-ip-address is the IP address of the remote server on which the tarball is to be stored. Ensure that the IP address is reachable from your switching network.

    • absolute-path-of-destination is the absolute location on the remote server where the tarball is to be stored.

      Example:

      where the name of the tarball is marcom1.tar.gz, the file transfer protocol type is SCP, and the path location where the information is to be saved is /path/to/backups/ at IP address 10.1.1.1.

      Note

      You can regenerate the personality file to capture updated information by using this same command.

Retrieving, Installing, Extracting, and Reconfiguring the Personality File

Before you retrieve the personality file from the remote server and install it on the replacement switch: Ensure that the Junos OS version on the replacement switch matches the Junos OS version in the personality file. If the versions do not match, and if any CLI commands were changed (added, modified, or removed) between the earlier version and the later version, the version in the personality file will be rejected during the configuration on the replacement switch and the configuration will not be committed.

To retrieve, extract, and install the contents of a specified personality file on a replacement switch, execute the following command in the operational mode on the replacement switch:

  • where:

    • protocol is the type of file transfer protocol (for example, scp, tftp, or ftp) to be used to retrieve the personality tarball from the remote server.

    • destination-server-ip is the IP address of the remote server from which the tarball is to be fetched. Ensure that the IP address is reachable from your switching network.

    • absolute-path-location/personality-file-name contains two pieces of information:

      • absolute-path-location is the absolute location on the remote server

      • personality-file-name is the name of the tarball stored on the remote server

    • retrieve-location is the location on the replacement switch where the file will be copied.

    Example:

    where the path location where the information is present is 10.1.1.1/path/of/backups/. The name of the tarball to be retrieved is marcom1.tar.gz. The path on the replacement switch where the personality file will be copied to is /var/tmp/.
Best Practice

We recommend that you use /var/tmp/ as the destination to keep consistency and also to have sufficient permissions.

Once the tarball is successfully copied to the device, the tarball is extracted and the configuration is applied onto the switch. Other contents of the personality file are extracted and copied to the file system of the switch.

Guidelines and Caveats for Personality Files

Keep the following guidelines and caveats in mind when you create and use personality files:

  • The personality file feature is not integrated with ZTP, so the replacement switch does not automatically fetch the personality file when the switch comes up after it is powered on.

  • Support of packages on the replacement switch will be based on compatibility of those packages with the version of software on the switch.