Saving and Restoring Netvisor ONE Configurations


A switch contains local configuration information such as port settings as well as fabric configuration information. Fabric configurations are stored on every switch in the fabric and does not require that you save and restore before replacing a switch. When a switch is replaced, removed, or otherwise disrupted, you can save and restore the local configuration information.


The information that is saved and restored on the local switch includes the following:


  • VNETs with vNET manager running on the switch
  • Port VLAN associations
  • Network services running on the switch


To display a full list of the current configuration details for a switch, use the running-config-show command.


SFTP and NFS can be used to transfer the configuration file, but you must enable the two features before using them.


Caution: There is a potential for data loss when restoring a configuration. The configuration on the switch is replaced by the configuration stored in the import file. Although ISO images and disk-library images are not likely to disappear, you should only perform switch-config-import on a switch that doesn’t have important data stored on it. As a precaution, consider using the command switch-config-export to save the data on the switch that you are importing the configuration file. Also, copy the ISO images and disk images from the switch using the iso-image-library and disk-library-image-export commands and copying the files from the switch.

 

To save the switch configuration to a file, use the following command:


CLI (network-admin@Leaf1) > switch-config-export export-file pleiades24

 

Exported configuration to /nvOS/export/pleiades24.2013-11-04T22.33.31.tar.gz

 

To display the files available for import and export, use the following command:


CLI (network-admin@Leaf1) > switch-config-show

 

switch       export-file

pleiades24   pleiades24.2013-11-04T22.33.31.tar.gz

 

You can now copy the configuration file to a different host using SFTP or NFS. For example, you can SFTP to the switch-ip-address, and login using the SFTP password. Then use cd/nvOS/import, and use get to download the configuration file.


The switch-config-export command is used to export the configuration of the local switch. The file that is created is a tar file that includes a number of configuration files for the switch. The file is created under /nvOS/export. This is the command used to export the current configuration on the local switch. Also, each time you reset the switch using the command, switch-config-reset, a backup of the configuration is made and places a file in the same location.

 

Once the switch configuration is exported, it becomes available to import on the same switch, by using the switch-config-copy-to-import command. Netvisor One copies the configuration tar file from the /nvOS/export to the /nvOS/import directory. Once in the /nvOS/import directory, it is possible to use the switch-config-import command to import the switch configuration.

 

  • The switch-config-import command is used to import a configuration on the local switch. When using that command, the intention is to import a switch configuration that was  previously exported by the same switch.
  • The switch-config-import command has a few parameters to it. The ignore-system-config and the apply-system-config parameters are two options that allow the imported configuration of the switch to override or not override the currently configured information found under the switch-setup-show command. When you select the ignore-system-config parameter, the local configuration is saved to an archive. If you select apply-system-config, the settings in the tar file are applied to the local switch.
  • When you import a configuration using the switch-config-import command, the current configuration on the switch is overwritten by the imported configuration file.


When a switch that was part of a cluster is replaced, the fabric-join repeer-to-cluster-node command is used for the new switch to receive all required switch configuration, including the local configuration.


To upload a configuration file to a switch and set the configuration for the switch using the configuration file, you must transfer the configuration file to the target switch using the following sequence of commands:


sftp@<switch-ip-address>

Connecting to switch-ip-address

Password: <password>

sftp> cd nvOS/import

sftp> put pleiades24.2013-11-04T22.33.31.tar.gz

 

Note: The configuration file must use the *.tar.gz extension to be recognized by nvOS.


Caution: Loading the configuration file causes nvOS to restart which results in a brief interruption to switch traffic flow.


Now load the configuration file which replaces the current configuration on the switch with the information in the file.


CLI (network-admin@Leaf1) > switch-config-import import-file pleiades24.2019-11-04T22.33.31.tar.gz

 

New configuration imported. Restarting nvOS...

Connected to Switch pleiades24; nvOS Identifier:0xb000011; Ver: 5.1.2.15459

 

There are many options available that allow you to control how the switch-config-import modifies the switch, including the following:

  • ignore-system-config  ignore the current system configuration.The settings in the *.tar file are not applied to the local switch.
  • apply-system-config  apply the system configuration in the imported file. The settings in the *.tar file are applied to the local switch. You typically do not want to use this option as it changes the in-band IP address and other settings.

 

By default, the initial switch system configuration, management IP addresses and other parameters, are not applied if there is another switch in the fabric with the same settings. To apply the initial settings, use the apply-system-config option. Also, by default, the imported configuration attempts to join the same fabric that the original switch was a member.