From 7a7499ba6dcac874be997b2a6f30321f3abbfd2f Mon Sep 17 00:00:00 2001 From: Alexander Heldt Date: Sun, 4 Oct 2026 10:28:10 +0000 Subject: [PATCH] manatee: Back up SQLite databases of DynamicUser services MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /var/lib/ 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. --- hosts/manatee/modules/restic/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hosts/manatee/modules/restic/default.nix b/hosts/manatee/modules/restic/default.nix index ae5fd84..f3a2cf9 100644 --- a/hosts/manatee/modules/restic/default.nix +++ b/hosts/manatee/modules/restic/default.nix @@ -51,11 +51,14 @@ let --exclude='__pycache__/' \ "$@" \ "$src/" "$dst/" + # find -H: with DynamicUser, /var/lib/ 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) ---