Last active
July 9, 2022 21:48
-
-
Save amiresp/57087fbeaffd3fa05cd6fde832502b4b to your computer and use it in GitHub Desktop.
rsync.sh
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
set -Eeuo pipefail | |
trap "echo '❌ Error'" ERR | |
echoStep () { | |
echo "🔹 $1" | |
} | |
error () { | |
echo "❌ $1" | |
exit 1 | |
} | |
fld="arc" | |
echoStep "Target Folder : $fld" | |
echoStep "sync: Starting ..." | |
rsync -Pazzh "/srv/$fld/" user@ip:/move/$fld/ | |
echoStep "FINISHED" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rsync for move server