Skip to content

Commit 6b168e7

Browse files
committed
Fix rsync target path
1 parent c715e03 commit 6b168e7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backup/rsync_home.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
55
REPO_DIR="$(dirname "${SCRIPT_DIR}")"
66
TIMESTAMP="$(date +%Y-%m-%d_%H-%M-%S)"
77
LOG_PATH="${REPO_DIR}/logs/rsync_backup_${TIMESTAMP}.txt"
8+
HOSTNAME="$(hostname)"
9+
HOSTNAME_TRIMMED="${HOSTNAME%"-kubuntu"}"
810

911
rsync \
1012
--archive --compress --delete --partial --progress --stats \
1113
--exclude-from="${SCRIPT_DIR}/rsync_exclude.txt" \
1214
"${HOME}" \
13-
"${USER}@agx-file-backup:." |& tee -a "${LOG_PATH}"
15+
"${USER}@agx-file-backup:/mnt/backup/${HOSTNAME_TRIMMED}/rsync/" |& tee -a "${LOG_PATH}"

0 commit comments

Comments
 (0)