# Paths of interest LOCALDIR=syncdir HOST=user@example.org LANDINGDIR=landingdir TARGETDIR=syncdir # Sync files from local device to the server landing dir rsync -auv --delete $LOCALDIR/ $HOST:$LANDINGDIR # Two-way-sync the landing dir with the target dir ssh $HOST " unison $LANDINGDIR $TARGETDIR \ -path paths/of/interest \ -path general/notes \ -path work/project " || echo # suppress potential non-zero exit ... # Get eventual changes back to local device rsync -auv --delete $HOST:$LANDINGDIR/ $LOCALDIR