rootfs/home/andre/home-sync.sh hinzugefügt

This commit is contained in:
2025-11-30 12:35:29 +01:00
parent 4489d8d92d
commit 37e07ce2b6

View File

@@ -0,0 +1,17 @@
#!/bin/bash
USR=andre
NAS=192.168.100.250
SRC="/home/${USR}/"
DEST="${USR}@${NAS}:/volume1/homes/${USR}/tux-home/"
RSYNC_OPTS="-az --delete --partial --timeout=20"
# Ping check (optional, verhindert lange Timeouts)
ping -c1 ${NAS} >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$(date): NAS unreachable"
exit 0
fi
# Sync starten
rsync $RSYNC_OPTS "$SRC" "$DEST"