jacobalberty / unifi-docker

Unifi Docker files
MIT License
2.16k stars 458 forks source link

How to run the clean up database scripts on a docker container #166

Closed MarkLFT closed 2 years ago

MarkLFT commented 5 years ago

Host operating system

Ubuntu Server 18.04.1 LTS

What tag are you using

Stable

What complete docker command or docker-compose.yml do you use to launch the container (omitting sensitive values)?

docker run --rm --init -p 8080:8080 -p 8443:8443 -p 3478:3478/udp -p 10001:10001/udp -e TZ='Asia/Singapore' -v ~/unifi:/unifi -d --restart=always --name unifi jacobalberty/unifi:stable

What do you expect to happen?

Need to run MOngoDb scripts to reduce disk space usage. See https://help.ubnt.com/hc/en-us/articles/204911424-UniFi-How-to-Remove-Prune-Older-Data-and-Adjust-Mongo-Database-Size#3.%20How%20to%20Prune%20Linux

What actually happens?

wget is not available in the container to get the script. How can we prune this database.

regner commented 5 years ago

The container is based on Ubuntu. So apt update followed by apt install wget would get you sorted. Curl should be available also so you can do it that way also.

ning42 commented 5 years ago

I'm in the same situation - and I have got wget installed in the docker.

But now comes the problem - I need to stop the unifi service, while the container is stilling so I can run the commands for the mongodb maint. as described in my case

https://help.ubnt.com/hc/en-us/articles/360006634094-UniFi-Network-Controller-Repairing-Database-Issues-on-the-UniFi-Controller

Any ideas tips on how to do this?

jacobalberty commented 5 years ago

You should be able to just use docker run -it --entrypoint bash -v

:/unifi jacobalberty/unifi From there launch mongodb how they describe and do your commands. On Fri, Jul 19, 2019, 10:08 AM ning42 wrote: > I'm in the same situation - and I have got wget installed in the docker. > > But now comes the problem - I need to stop the unifi service, while the > container is stilling so I can run the commands for the mongodb maint. as > described in my case > > > https://help.ubnt.com/hc/en-us/articles/360006634094-UniFi-Network-Controller-Repairing-Database-Issues-on-the-UniFi-Controller > > Any ideas tips on how to do this? > > — > You are receiving this because you are subscribed to this thread. > Reply to this email directly, view it on GitHub > , > or mute the thread > > . >
ning42 commented 5 years ago

@jacobalberty thank you that did the trick 👍 Hopefully my supportcase can proceed :)

xbmcnut commented 4 years ago

Could someone please explain the process for a NOOB? I'm looking to try a prune to see if this will fix my Connect failed: 0x80060016/WebRTC connection timed out errors when trying to get to the debug terminal on any of my devices.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.