aboutsummaryrefslogtreecommitdiff
path: root/modules/services
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-23 06:41:12 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-23 06:45:07 -0700
commited88c9593e5c7675c6ac1fbc1cc7910b84c5592e (patch)
tree63d82eb8193edd2119b007a953a3b7ab9d07e22b /modules/services
parentfeat(home/shell): add alias to search nix packages (diff)
downloadinfra-ed88c9593e5c7675c6ac1fbc1cc7910b84c5592e.tar.gz
fix(modules/unifi): only backup the backup directory
`/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>
Diffstat (limited to 'modules/services')
-rw-r--r--modules/services/unifi/default.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/services/unifi/default.nix b/modules/services/unifi/default.nix
index a311755..3ffae15 100644
--- a/modules/services/unifi/default.nix
+++ b/modules/services/unifi/default.nix
@@ -83,6 +83,6 @@ in
credentialsFile = secrets."acme/credentials".path;
};
- my.services.backup = { paths = [ "/var/lib/unifi" ]; };
+ my.services.backup = { paths = [ "/var/lib/unifi/data/backup" ]; };
};
}