summaryrefslogtreecommitdiff
path: root/sync_tt_to_alt.sh
diff options
context:
space:
mode:
authordoc <doc@filenotfound.org>2025-09-16 11:30:38 +0000
committerdoc <doc@filenotfound.org>2025-09-16 11:30:38 +0000
commit5cfeb2cf156705349730bdc6ce883fd8eb22e728 (patch)
tree13758f78513ed74198d2257c11c0ef9a913725d1 /sync_tt_to_alt.sh
first commitHEADmaster
Diffstat (limited to 'sync_tt_to_alt.sh')
-rwxr-xr-xsync_tt_to_alt.sh14
1 files changed, 14 insertions, 0 deletions
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"