#!/bin/zsh sourceDir="/home/rob" destinationDir="/media/3TB/Backup/tp_t520_d3v" excludefile='--exclude-from=rsync_exclude_list' #includefile='--include-from=rsync_include_list' if [ -d "$sourceDir" ]; then scope="code" rsync -arlh --stats --progress $excludefile $includefile $sourceDir/$scope bfds:$destinationDir/$scope #rsync -arlh "$excludes" "$includes" --stats $sourceDir root@kodi:$destinationDir -vvv scope="data" rsync -arlh --stats --progress $excludefile $includefile $sourceDir/$scope bfds:$destinationDir/$scope #Documents rsync -arlh --stats --progress $excludefile $includefile $sourceDir/Documents bfds:$destinationDir/Documents #dotfiles fi