UniFi - Troubleshooting Issues with Controller Backup Files


Overview


This article provides steps on how to troubleshoot and solve issues resulting in an error that appears when manually creating a backup file from the Maintenance section of the UniFi Network Controller. Some of the steps in this article can also help solve issues such as the Controller not creating auto-backup files at the time they are scheduled.


Table of Contents


  1. Introduction
  2. Troubleshooting Steps
  3. Related Articles

Introduction


Back to Top

The error that the Controller produces when it can't create a backup file can vary depending on the observed location of logging. See examples below:

Web UI

error.png

Server.log

[2018-11-27 12:02:11,709] <backup> ERROR system - Fail to create a backup for version '5.9.29'
[2018-11-27 12:02:11,709] <backup> ERROR system - Info on backup error is...
Java logging between events omitted.
[2018-11-27 12:02:11,709] <backup> INFO system - [server backup][BACKUP] end
[2018-11-27 12:02:11,711] <backup> INFO event - [event] Backup failed

The logging in the web UI will not show up for auto-backup, only when manually attempting and failing to create a backup.


Troubleshooting Steps


Back to Top

1. Try a different browser.

Before progressing to the steps below, try using a different browser to see if the problem resides with the browser or with the UniFi Network Controller host. Chrome is Ubiquiti's preferred browser.

It can also be useful to use the developer console found on most modern browsers. This console can be found under Developer Tools (Ctrl + Shift + J on Windows or Linux/Cmd + Opt + J on macOS).

2. Does the problem occur when using webRTC, direct connection, or both?

There are three options available when launching the Controller from the UniFi Cloud Access Portal. After clicking on a Controller in the main list, the Sites Overview panel will pop out with the different possibilities. When selecting the "Launch using Cloud" option, WebRTC is used. When selecting hostname or IP of Controller, a direct connection is used. Try creating the backup on both types of connections if possible. If the issue is persistent on both, move on to the next step. 

3. Check Server.log logging.

To see the logs that are printed to the server.log file on the Controller, navigate to Insights > Controller Logs.

As logs populate the file, line by line the output is displayed in this area. To fetch more logging a single log must first populate the buffer. To download the file for viewing or archiving select Download Logs. As mentioned above, if the backup is failing this is the area that should give the most information as to why the backup is failing.

Debug Logging for server.log

Navigate to Settings > Maintenance > Services to adjust the system logging level if more output is needed to diagnose the issue.

4. Database Corruption

In most cases, this will be the issue that prevents the Controller from creating a backup. Database corruption will cause MongoDB to deliver errors when trying to read corrupt or invalid entries. 

For more instructions on how to repair a database see our article here

5. Invalid Permissions

Invalid permissions on user created files can cause issues when trying to back up as well. The most common user created file is the config.gateway.json. Check this file to ensure it has proper permissions. It should be an owner and a group of unifi:unifi for Linux/Cloud Key users. Find more information about the config.gateway.json file here: UniFi - USG Advanced Configuration 


Related Articles


Back to Top

UniFi - How to Remove (Prune) Older Data and Adjust Mongo Database Size

UniFi - Network Controller: Repairing Database Issues on the UniFi Controller

UniFi - USG Advanced Configuration


We're sorry to hear that!