×

UniFi - USW Leaf: Backup & Restore Configuration

Overview

This article describes a step-by-step approach on how to do a manual backup Quagga configuration onto a remote server, reset the USW-Leaf switch to default settings and restore the configuration once again. It can also be useful when migrating an old switch's existing configuration to a new one.

NOTES & REQUIREMENTS:
  • The USW-Leaf is currently available in the Early Access store and discussed in the beta forum of the Community. To view these, please make sure you have Early Access enabled and you are logged in.
  • Before proceeding with this method, make sure you have SSH access (and optionally, a TFTP server) on the network on which you have IP connectivity. This server will be used as backup storage.

Table of Contents

  1. How to Perform Backup and Restoration
  2. Restoration Procedure
  3. Testing & Verification
  4. Related Articles

How to Perform Backup and Restoration

Back to Top

1. Log in to device (via SSH) to access Linux CLI:

image1.png

User Tip: Type vtyshin the CLI window to enter vtysh mode. The vtysh mode is used for "network switching" related commands and configurations. To exit vtysh mode, type exit and hit enter.

2. Save running config to startup config(Quagga.conf) from vtysh. Type command write and hit enter to continue. You will see the following output in the CLI window.

UBNT# write
Building Configuration...
Integrated configuration saved to /etc/quagga/Quagga.conf
[cli_mode] Integrated configuration copied to persistent storage
[OK]

3. Backup /etc/quagga/Quagga.conf to your remote server using SCP or TFTP. Note that the hashtags ($) in the commands in this article should not be typed in. They represent if you are in Linux shell ($), or vtysh shell (UBNT#).

Run the following command if using SCP:

$ scp /etc/quagga/Quagga.conf <user>@<ip>:scp/Quagga.conf.bkp

Run the following commands if using TFTP:

$ cd /etc/quagga/
$ tftp -p -r Quagga.conf <ip>

Make sure the backup completed successfully by checking the configuration with a text editor. The content of the file should be the same as what you would see if you run the show running config command. 

Restoration Procedure

Back to Top 

NOTE:The following two steps: 4 and 5 are optional, and should only be followed if a factory reset is required for some reason. You can perform config restoring without resetting to factory defaults.

1.  Reset switch to factory defaults by issuing the following command:

$ factory-reset.sh

2.  Configure mgmt IP to reach the remote host. Obtain it via DHCP with the following commands:

UBNT(config)# interface bridge 1
UBNT(config)# ip address dhcp

Or use static configuration:

UBNT(config)# interface bridge 1
UBNT(config)# ip address <IP_ADDRESS/NETWORK_PREFIX>

For more detailed information refer to the UniFi - USW-Leaf CLI Command Comparison article, the DHCP Client/Static IP Section

3. To restore the configuration, download it from the server using SCP or TFTP and apply to vtysh.

Run the following command if using SCP:

$ scp <user>@<ip>:scp/Quagga.conf.bkp /config/Quagga.conf
$ reboot

Run the following commands if using TFTP:

$ cd /config/
$ tftp -g -r Quagga.conf <ip>
$ reboot

Testing & Verification

Back to Top

Use the show running-config command in vtysh shell to confirm that the configuration file has been restored to the switch. By comparing it with the downloaded one in a text editor, as you did in step three.

Related Articles

Back to Top

UniFi - USW-Leaf CLI Command Comparison

Was this article helpful?
1 out of 4 found this helpful
Can't find what you're looking for?
Visit our worldwide community of Ubiquiti experts for more answers
Visit the Ubiquiti Community