#!/bin/sh DIR=$(dirname "$0") cd "$DIR/backup" ssh pi@pi "cd backups; tar czf - *" | tar xzf -