#!/bin/sh # on the target, create a file in the root directory called # 'backup.dirs' [ -z "$1" ] && echo "usage: $0 " && exit 1 ssh root@$1 'cd / ; tar c `cat backup.dirs`' | gzip > $1.tar.gz