From 5cfeb2cf156705349730bdc6ce883fd8eb22e728 Mon Sep 17 00:00:00 2001 From: doc Date: Tue, 16 Sep 2025 11:30:38 +0000 Subject: first commit --- sync_tt_to_alt.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 sync_tt_to_alt.sh (limited to 'sync_tt_to_alt.sh') diff --git a/sync_tt_to_alt.sh b/sync_tt_to_alt.sh new file mode 100755 index 0000000..1d94d4a --- /dev/null +++ b/sync_tt_to_alt.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# === Sync /home/tt from Montreal to Linode === + +# Vars +SOURCE="/home/tt/" +DESTINATION="root@172.238.63.162:/home/tt/" +LOG_FILE="/var/log/tt_sync.log" +DATE=$(date '+%Y-%m-%d %H:%M:%S') + +# Rsync command - preserves perms, ownership, etc. +rsync -az --delete "$SOURCE" "$DESTINATION" >> "$LOG_FILE" 2>&1 + +# Logging +echo "[$DATE] Sync completed" >> "$LOG_FILE" -- cgit v1.2.3