| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
They've recently removed from nixpkgs the version of mongodb that was
used by unifi. I updated to the latest version (7) and did the migration
of the DB manually (see https://github.com/NixOS/nixpkgs/pull/207382):
```
nix-shell -p mongodb-3_4 mongodb-tools
mongod --dbpath /var/lib/unifi/data/db --logpath /var/log/unifi/repair.log --repair
mongod --dbpath /var/lib/unifi/data/db --logpath /var/log/unifi/repair.log --journal --fork
mongodump --out=/root/mongodump
pkill mongod
exit
nix-shell -p mongodb-4_2 mongodb-tools
mv /var/lib/unifi/data/db /var/lib/unifi/data/db_bak
mkdir /var/lib/unifi/data/db
mongod --dbpath /var/lib/unifi/data/db --logpath /var/log/unifi/repair.log --journal --fork
mongorestore /root/mongodump
pkill mongod
```
Once this was done, the exporter was also broken, has it has been
renamed. There are two different services for it in nixpkgs:
`services.unpoller` and `services.prometheus.exporters.unpoller`. Only
the last one works.
From what I can tell, everything is working now.
|
|
|
|
|
|
|
|
| |
The poller refuses to start, as the name of the binary has been updated,
and the upstream module is not reflecting that change. The service has
also been renamed from `unifi-poller` to `unpoller`, but this is not
working for now. Let's get rid of it as a temporary fix while looking at
the correct solution.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Only serve a response if the request is coming from tailscale. To ensure
this is the case, let's configure nginx to only listen on the tailscale
IP of the host for that server.
Note: the IP for tailscale is hard coded, there has to be a better way.
Change-Id: I75978866eb978439df76cede5bf993762f7cd5ab
Reviewed-on: https://cl.fcuny.net/c/world/+/485
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`/var/lib/unifi` is almost 1GB. The data directory contains a lot of
files that are changing constantly, which creates a significant amount
of data to backup everyday. Overall if I need to restore a backup for
unifi, I don't care about metrics and other application data, I only
need to restore a backup, which contains the network configuration.
`/var/lib/unifi/data/backup` is smaller:
```
fcuny@tahoe ~> sudo du -sh /var/lib/unifi/data/backup
332M /var/lib/unifi/data/backup
```
and each backup is about 12MB:
```
fcuny@tahoe ~> sudo ls -ltrh /var/lib/unifi/data/backup/autobackup|tail -2
-rw------- 1 unifi unifi 12M Jun 22 18:15 autobackup_6.5.55_20220623_0115_1655946900001.unf
-rw------- 1 unifi unifi 5.0K Jun 22 18:15 autobackup_meta.json
```
This will reduce the churn in our daily backup significantly.
Change-Id: Ie39ffa9055605298a82ba6731acc34fd4e29309c
Reviewed-on: https://cl.fcuny.net/c/world/+/471
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
|
|
|
|
|
|
|
|
|
| |
This was done by running `nixpkgs-fmt .'.
Change-Id: I4ea6c1e759bf468d08074be2111cbc7af72df295
Reviewed-on: https://cl.fcuny.net/c/world/+/404
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
|
|
|
|
|
|
|
| |
Change-Id: Ide8e479bc88689e052a372825bc90b23b426a89a
Reviewed-on: https://cl.fcuny.net/c/world/+/382
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
|
| |
|
| |
|
|
|
|
|
| |
Refactor a bit the configuration, which should simplify the management
and usage of secrets from now on.
|
|
|
|
| |
Do a single backup for the host, instead of running multiple ones.
|
|
|