#!/bin/sh

foo()
{
set -x
(cd /etc && tar cf - backup/ ) | $2 $1 "cd /etc && tar xvfpB - "
$2 $1 "rm -rf /etc/backup/db"
$2 $1 "rm -rf /etc/backup/hosts"
$2 $1 "cd /etc/backup && ln -s distrib/$3 hosts"
}


/bin/rm -rf /etc/backup/db
set -x
for i in aquila  triton; do
foo $i ssh hosts.madingley
done
for i in heidh selene circe ; do
foo $i rsh hosts.humbnet
done

