Last active
November 1, 2021 15:27
-
-
Save JamesMcMahon/4e410e97ed688e4c969fd2983ce4e2b6 to your computer and use it in GitHub Desktop.
Remote backup Rsync
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
log_file=$1 | |
local_path=$2 | |
remote_path=$3 | |
time rsync --archive --verbose --new-compress --human-readable --protect-args --progress --exclude=.DS_Store --log-file=rsync_${log_file}.log ${local_path} ${remote_path} | |
time rsync --checksum --archive --verbose --new-compress --human-readable --protect-args --progress --exclude=.DS_Store --log-file=rsync_${log_file}_checksum-verify.log ${local_path} ${remote_path} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment