x20x-sync 349 Bytes
Newer Older
1 2
#!/bin/sh

Nico Schottelius's avatar
Nico Schottelius committed
3 4
dir="/home/"

5 6
case $(hostname) in
   kr)
Nico Schottelius's avatar
Nico Schottelius committed
7
      other="root@ikn.ethz.ch"
8 9 10
   ;;

   ikn)
Nico Schottelius's avatar
Nico Schottelius committed
11
      other="root@kr.ethz.ch"
12
   ;;
Nico Schottelius's avatar
Nico Schottelius committed
13 14 15 16
   *)
      echo "I am confused, where I am?"
      exit 1
   ;;
17 18
esac

Nico Schottelius's avatar
Nico Schottelius committed
19 20 21 22
sudo rsync -av \
   --exclude /home/services/eth-usbhd  \
   --exclude /home/services/usbhd      \
   --delete-before --delete $dir $other:$dir