I have my unifi controller running on a digital ocean droplet. I currently am using the digital ocean backup utility along with having the controller taking backups once a week. But would like to take a snapshot of the droplet and they said it’s best to shut down the droplet before doing the snapshot.
Would it be best to shut down the controller at the command line and then shut down the droplet or would it be better to just shut down the droplet and of course that would shut down the controller? I was leaning toward the first option.
I am not familiar with the droplets. I would research if clicking shutdown in the web ui on the droplet is the same as a cli shutdown.
One of the vm clusters I used I know for sure worked like this. Clicking shutdown in the web ui was equivalent to typing shutdown.
You could also simply stop the UniFi service using
service unifi stop and put that into a script that runs at a certain time. My solution for backup is to turn on the automatic backups in the controller UI and then run a cron job that sends file over to another server using this line:
rsync -avrhiO --no-perms --delete --progress --stats /var/lib/unifi/backup/autobackup/ -e ssh email@example.com:/mnt/LTS_Server_Data_Backups/unifi/
Also make sure the “Data Retention Days” option in UniFi is set to “Settings Only”
Thank you Tom for the replay, I watched a video that you talked about that and I have the automatic backups turned on but have not done the script yet.
Due to having all our offices on the cloud unifi along with the owners house, I want to make sure if something goes sideways and I have to rebuild it I can do it quickly but also know it will work.
Thank you again for the script,I am going to get that setup this morning.