macOS tools moving to my git
This commit is contained in:
33
rsync2mini.sh
Executable file
33
rsync2mini.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# *** REMEMBER TO ADD SSH KEY ***
|
||||
# *** ADD /usr/sbin/cron TO FULL DISK ACCESS ***
|
||||
#
|
||||
|
||||
# Add the paths needed
|
||||
PATH=/usr/local/bin:/usr/local/sbin:~/bin:/usr/bin:/bin:/usr/sbin:/sbin
|
||||
# Disable mail alerts
|
||||
MAILTO=""
|
||||
|
||||
cd /Users/shughey/Dropbox/schmeeve-macos-tools
|
||||
|
||||
# This solves the "Permission denied, please try again." error
|
||||
# Where ssh-agent is running, for password-less access to the key
|
||||
export SSH_AUTH_SOCK=$( ls /private/tmp/com.apple.launchd.*/Listeners )
|
||||
|
||||
# Print the time for logging purposes
|
||||
now=$(date)
|
||||
echo "Running backup now : $now"
|
||||
|
||||
# Run the rsync
|
||||
rsync -vrau --delete -e "ssh -p 22" \
|
||||
/Volumes/Katya/Users/shughey/motiv8 \
|
||||
schmeeve@mini.nas:/mnt/miniNas/miniShare1/Projects/ \
|
||||
--progress --stats \
|
||||
--exclude="Library" \
|
||||
--exclude="Library/*" \
|
||||
--exclude=".Trash" \
|
||||
--exclude=".Trash/*"
|
||||
|
||||
# Print a blank line for logging purposes
|
||||
echo ""
|
||||
Reference in New Issue
Block a user