Compare commits

..
2 Commits
Author SHA1 Message Date
Alexander Heldt 7a7499ba6d manatee: Back up SQLite databases of DynamicUser services
/var/lib/<name> is a symlink into /var/lib/private for those, so find
stopped at the link and the state dump never copied their databases
(schema, puppy-tracker, todo, …). Follow it with find -H.
2026-10-04 16:36:33 +00:00
Alexander Heldt ab700c0368 manatee: Cap ZFS ARC at 4 GiB 2026-10-04 16:36:33 +00:00
2 changed files with 7 additions and 1 deletions

No files matched your search

+3
View File
@@ -86,6 +86,9 @@
services.zfs.autoScrub.enable = true;
# Cap the ARC at 4 GiB (default is ~all of RAM); leaves room for services on this low-memory host.
boot.kernelParams = [ "zfs.zfs_arc_max=${toString (4 * 1024 * 1024 * 1024)}" ];
# Don't force-import the pool if it appears in use elsewhere; safer default in 26.11+.
boot.zfs.forceImportRoot = false;
+4 -1
View File
@@ -51,11 +51,14 @@ let
--exclude='__pycache__/' \
"$@" \
"$src/" "$dst/"
# find -H: with DynamicUser, /var/lib/<name> is a symlink into
# /var/lib/private, and plain find stops at the link and finds no
# databases (rsync follows "$src/", but excludes them on purpose).
while IFS= read -r db; do
local rel="''${db#"$src"/}"
install -d -m700 "$dst/$(dirname "$rel")"
sqlite3 "$db" ".backup '$dst/$rel'"
done < <(find "$src" -maxdepth 4 -type f \( -name '*.sqlite' -o -name '*.db' \))
done < <(find -H "$src" -maxdepth 4 -type f \( -name '*.sqlite' -o -name '*.db' \))
}
# --- romm: logical MariaDB dump + user assets (saves/states/screenshots) ---