#!/bin/sh

dir="/home/"

case $(hostname) in
   kr)
      other="root@ikn.ethz.ch"
   ;;

   ikn)
      other="root@kr.ethz.ch"
   ;;
   *)
      echo "I am confused, where I am?"
      exit 1
   ;;
esac

sudo rsync -av \
   --exclude /home/services/eth-usbhd  \
   --exclude /home/services/usbhd      \
   --delete-before --delete $dir $other:$dir