From 37e07ce2b6855c3639f5133d0f80fd6867150bbe Mon Sep 17 00:00:00 2001 From: andre Date: Sun, 30 Nov 2025 12:35:29 +0100 Subject: [PATCH] =?UTF-8?q?rootfs/home/andre/home-sync.sh=20hinzugef=C3=BC?= =?UTF-8?q?gt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rootfs/home/andre/home-sync.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 rootfs/home/andre/home-sync.sh diff --git a/rootfs/home/andre/home-sync.sh b/rootfs/home/andre/home-sync.sh new file mode 100644 index 0000000..4ae2db5 --- /dev/null +++ b/rootfs/home/andre/home-sync.sh @@ -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" \ No newline at end of file