UniFi Video is a legacy product line.

This application and its related devices will no longer receive any manner of technical support, including functional and security updates. Additionally, there will be no further updates to Help Center content pertaining to UniFi Video.

UniFi - USW Leaf: Backup & Restore Configuration


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 existing configuration to a new one.

  • The USW-Leaf is currently available in the Early Access store and discussed in the Early Access section of the Community. To view these, please make sure you have Early Access enabled for your Ubiquiti account and that you are logged in.
  • Before proceeding with this method, make sure that 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 location.

Table of Contents

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

How to Perform a Backup and Restoration

CLI: Access the Command Line Interface on the USW-Leaf using SSH.

1. Log in to device using your credentials.

2. Use the vtysh command to enter the vtysh mode. This mode is used for switching-related commands.

  ___ ___      .__________.__
 |   |   |____ |__\_  ____/__|
 |   |   /    \|  ||  __) |  |   (c) 2010-2020
 |   |  |   |  \  ||  \   |  |   Ubiquiti Inc.
 |______|___|  /__||__/   |__|
            |_/                  https://www.ui.com/

      Welcome to UniFi Switch Spine!
Type 'vtysh' to start configuration. $ vtysh Hello, this is Quagga. Copyright 1996-2005 Kunihiro Ishiguro, et al. UBNT#

3. Save the running config to the startup config (Quagga.conf) from the vtysh mode.

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

4. Exit out of the vtysh mode with the exit command.


5. Back up the /etc/quagga/Quagga.conf to your remote server using either SCP or TFTP. 

scp /etc/quagga/Quagga.conf <user>@<ip>:/Quagga.conf.bkp
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

1. Make sure that you exit out of the vtysh mode with the exit command.

2.  optional.png  Reset the switch to factory defaults:


3.  optional.png  Configure the management IP address to reach the remote host.


configure terminal
interface bridge 1
ip address dhcp


configure terminal
interface bridge 1
ip address <ip/prefix-length>
NOTE: See the UniFi - USW Leaf: CLI Command Comparison article for more information on the available CLI commands.

4. From the $ shell, run the following command to restore the configuration from your remote server using either SCP or TFTP. 

scp <user>@<ip>:/Quagga.conf.bkp /config/Quagga.conf
cd /config/
tftp -g -r Quagga.conf <ip>

5. Reboot the device after the transfer has successfully completed.


Testing & Verification

Use the show running-config command in vtysh mode to confirm that the configuration file has been restored to the switch.  

show running-config

Afterwards, you can compare the terminal output with the backup configuration stored on your remote server.

Related Articles

UniFi - USW Leaf: CLI Command Comparison

Was this article helpful?
22 out of 30 found this helpful