try
do shell script "ls /Volumes/Terrabyte/"
do shell script "ls /Volumes/TerrabyteTwo/"
on error
display dialog "External drive not mounted."
error number -128 #supposedly kills the current Automator workflow
end try
/usr/bin/curl https://XXXXX:[email protected]/v1/posts/all?format=json -o /Volumes/Terrabyte/Recovery/Bookmarks/pinboard_backup.json
curl -d "username=XXXXX&password=XXXXX" --cookie-jar cookies.txt -i -X POST https://www.newsblur.com/api/login
curl -b cookies.txt -o NewsBlur_$(date +"%Y-%m-%d").opml https://www.newsblur.com/import/opml_export
Excluding music files in the home library because everything should be in the external drive.
rsync -lptgoDv --exclude-from=/Volumes/Terrabyte/backup-excludes.txt /Users/jpfinley/Music/iTunes/iTune* /Volumes/Terrabyte/iTunes/
do shell script "rsync -a --delete --exclude-from=/Volumes/Terrabyte/backup-excludes.txt /Volumes/Terrabyte/ /Volumes/TerrabyteTwo/" with administrator privileges