Unifi Controller auto backup then Synology backup

I have a Unifi Controller set up on a Vultr Ubuntu Server 20.04. Currently I have about 20 sites. Is there a way for me to do one backup of the whole group of sites? Autobackup is turned on by default in the Settings>Backup tab. I can see the backups in this window. I can’t find them in the /var/lib/unifi/backup/autobackup/ folder. when I ssh into the server I am able to get as far as the unifi folder, but then there is no folder labeled backup. Is it possible for anyone to help me with this.

All the systems we have show them under
/var/lib/unifi/backup/autobackup
not sure where else they would be.

I followed Chris from Crosstalk video when setting up the server. Definitive Guide to Hosted UniFi 2021 - YouTube. In the setup we disable access as root for security reasons. However we give the new user created root privileges. would that have something to do with it? I can navigate all the way to the unifi folder in the Synology “Active Backup for business” however once I select that folder I get a permissions error.

Found the backup files in /var/lib/unifi/backup/autobackup as you said. However the user they are controlled by is unifi. I’m guessing when you install the unifi controller it creates its own user. I was able to change the permissions so that any user had access to the folder however every time the unifi user creates another backup the permissions are not allowing others to read, write, or execute. Because of this the auto backup on the Synology fails to perform the backup because it doesn’t have permission to backup this file.

You need to add what ever service is running the backup to the UniFi group in that system so it has permissions.

Thanks Tom. I happened across that same link when trying to figure out what to do. Actually I had done the usermod command last night and I didn’t think it added my user ‘unifiadmin’ to the group. However this morning I logged into my server and ran the ‘groups’ command and I had already been added to the ‘unifi’ group. I must have don’t it correctly last night and just didn’t check properly. I also checked my backup files on my Synology and it showed my backup ran successfully last night. Very cool stuff. Thanks for setting up this forum and all the great videos.

1 Like

Back at it again. Had to start a new server. Luckily I had a backup. I’m trying to set up the backup to go to my Synology again. The backups are created by the “unifi” user. I believe this user is created by the controller software. I was able to add my username to the unifi group which got me into the unifi folder. Now I need to get into the backup folder.

drwxr-x— 3 unifi unifi 4096 Jun 22 15:42 backup

These are the permissions. As you can see the user has rwx and the group only has r-x. I’m pretty sure I need to get rwx for the group so I can access what is in the backup folder. If I am logged in as a user that is part of the group am I able to change the permissions of the backup folder? If so how can I. I know I am not able to login as the unifi user. I can become root but root is not part of the unifi group. Any help is appreciated.

I figured it out. I had to use sudo in order to execute the command.