8 lines
298 B
Bash
8 lines
298 B
Bash
#!/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"
|