temp: backup freshness check

This commit is contained in:
hermes-agent committed 2026-11-02 18:30:03 +01:00
1 parent 6e340b6d6a
commit 38cd673270
1 file changed
+22
+22
View File
@@ -0,0 +1,22 @@
name: backup-check
on:
workflow_dispatch:
jobs:
check:
runs-on: nixos
steps:
- name: inspect restic repo freshness
run: |
set +e
/run/current-system/sw/bin/docker run --rm -v /mnt/backups:/b:ro ubuntu:24.04 bash -c '
echo "== now"; date
for p in /b/perlis-appdata /b/perlis-conf; do
echo "-- $p"
stat -c " mtime=%y" "$p" 2>&1
echo -n " snapshots: "; ls -1 "$p/snapshots" 2>/dev/null | wc -l
echo -n " newest snapshot file: "; ls -1t "$p/snapshots" 2>/dev/null | head -1
stat -c " newest mtime=%y" "$p/snapshots/$(ls -1t "$p/snapshots" 2>/dev/null | head -1)" 2>&1
du -sh "$p" 2>/dev/null
done
echo "== df"; df -h /b
'