add a home backup script

This commit is contained in:
2025-12-08 19:03:20 +00:00
parent 6d9e311be4
commit dbbc6e362e

7
bin/backup-home.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/bin/sh
# Tar my dotfiles and configs to the NAS. Excludes anything gitignored-looking.
set -eu
dest="/mnt/nas/backup/$(hostname)-$(date +%F).tgz"
tar --exclude='*.env' --exclude='*.pem' --exclude='*.p12' \
-czf "$dest" "$HOME/.config" "$HOME/dotfiles" 2>/dev/null || true
echo "wrote $dest"