#!/bin/bash TARGET="backupuser@localhost:~/backup_folder" for i in folder_01 folder_02 folder_03; do rsync -av --delete "$i"/ "$TARGET"/"$i"; done