Support Downloads Community

UniFi Video is an obsolete 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 - How to Create and Restore a Backup


This article describes how to generate a backup of the UniFi Network Controller as well as how to restore it. This article does not cover the Auto Backup feature. You may see this article for more information on that subject: UniFi - How to Configure Auto Backup.

This article is applicable to current UniFi Network Controller versions. Instructions on backups for older versions can be found at the bottom of this page in the "Method 3: Restoring from the /data Directory" section. As always, we suggest you update to the newest software and firmware available.

Table of Contents

  1. Introduction
  2. Generating a New Backup
  3. Restoring a Backup
  4. Changing the Inform Address for All Devices in Controller
  5. Related Articles


Back to Top

The UniFi backup file has an extension of .unf and contains the settings and the database for the UniFi Network Controller. The database is not included in a "settings only" backup. The backup also includes the and config.gateway.json advanced configuration files, maps, and any customized files in a site's portal folder. You can download a backup at any time from the Controller following the steps below.

Generating a New Backup

Back to Top

Users can generate a new UniFi backup file (.unf) at any moment by going to System Settings > Maintenance > Backup / Restore > Click Download Backup. You can modify what the backup will contain by selecting Settings Only or a time range to also include historical data.


Restoring a Backup

Back to Top

Method 1: Restoring in the UniFi Controller

To restore a backup you have previously downloaded, log in to the UniFi Controller and follow these steps:

1. Go to Settings > Maintenance > Restore > Click Choose File button.

2. The file will load and you will be asked to confirm you wish to restore that backup.

3. Once you confirm, the backup restoration will begin. This process takes a few minutes, do not disconnect while the Controller is working on this. Once the new backup is restored, the Controller will restart.

Method 2: Restoring in the UniFi Startup Wizard

If beginning a new installation, it will be easier to just use the option of restore from a previous backup as soon as the UniFi Startup Wizard launches, and select your .unf file.

Method 3: Restoring from the /data Directory

ATTENTION:This method is for older UniFi Controller versions and is not recommended. For security reasons, we suggest to always upgrade to the newest release available. If you still wish to use this method, click on the link below.

Click here to display Method 3: Restoring from the /data Directory.

If the original /data folder (with all subfolders and contents inclusive) is available, follow these steps (some might need to be performed via CLI):

  1. Stop the Controller.
  2. Make sure java and mongod are not running (on Windows Mongod is rather persistent, so it's best to perform the following steps in Safe Mode)
  3. Copy the new keystore (found in new /data directory) file to the old backup /data directory, overwriting the old one.
  4. Delete the new /data directory.
  5. Copy the old /data directory to the new UniFi installation.
  6. Restart the controller

Data folder locations:


  • Vista+: C:\Users\username\Ubiquiti UniFi\data
  • XP: C:\Documents and Settings\username\Ubiquiti UniFi\data


  • Actual directory: /var/lib/unifi/
  • Symlinked directory: /usr/lib/unifi/data


  • /Applications/
User Tip:If the .unf file is very large it may result in an error saying Failed to Start on import or migration. You may let this sit for a while, and then try accessing the Controller. It may import without a problem. If it doesn't import properly though, you may need to revert to the original version of the Controller, run the pruning script, make a new backup, then either purge and install then restore, or do an in-place upgrade.

Changing the Inform Address for All Devices in Controller

ATTENTION:Use this method with caution. After completing these steps the devices will be setting the inform address to the new IP address or FQDN specified.  

It may be desired to change the IP address or FQDN that the UniFi devices on multiple sites are reporting to after a controller restore. This process is typically used when migrating from one functional controller to a new install.

1. Download a backup file from the current controller.

2. Install the UniFi Controller on the new host. 

3. Restore the backup that came from step 1 and let the upload process finish.

4. Log into the new controller. 

5. On the old controller: Under Settings > Controller > Controller Settings, type in the new controller's IP address or FQDN in the Controller Hostname/IP field. Also, tick the "Override inform host with controller hostname/IP" checkbox.

6. Select Apply Changes.

After the changes are applied the old controller will send the configuration to Connected state devices stating the inform host is now what was input in the Controller Hostname/IP field.

If this was performed correctly, the devices should start appearing in the new controller host. The process should not take longer than 5 minutes but can be longer depending on the number of devices, physical proximity of the devices, and new controller hardware specs.

Related Articles

Back to Top

UniFi - How to Configure Auto Backup

UniFi - Troubleshooting Issues with Controller Backup Files

Was this article helpful?
140 out of 328 found this helpful