+ #clean up our dir at this client
+ if ! ssh root@$computer "rm -r ~/.backup ; mkdir -m 700 ~/.backup"; then
+ echo `date`" $computer: Could not create backup staging area at $computer:~/.backup - skipping backup of $computer"
+ # We don't want to return 0
+ R=1
+ continue;
+ fi
+
+ #try to copy $exclude to $computer
+ if ! scp $exclude root@$computer:~/.backup/exclude > /dev/null; then
+ echo `date`" $computer: Could not copy exclude.txt to $computer - skipping backup of $computer"
+ # We don't want to return 0
+ R=1
+ continue;
+ fi
+
+ #try to copy preeexec and postexec if they exist
+# TODO: Gah, clean this mess!
+ [ -f $confdir/preexec.$computer ] && (
+ scp $confdir/preexec.$computer root@$computer:~/.backup/preexec >&2 ||
+ ( echo `date`" $computer: Could not copy preexec.$computer to $computer:~/.backup/preexec - skipping backup of $computer"
+ R=1
+ continue
+ )
+ )
+ [ -f $confdir/postexec.$computer ] && (
+ scp $confdir/postexec.$computer root@$computer:~/.backup/postexec >&2 ||
+ ( echo `date`" $computer: Could not copy postexec.$computer to $computer:~/.backup/postexec - skipping backup of $computer"
+ R=1
+ continue
+ )
+ )
+
+ #try to run preexec if it exist
+ if ! ssh root@$computer "[ ! -f ~/.backup/preexec ] || /bin/bash -x ~/.backup/preexec" >&2; then
+ echo `date`" $computer: Could not run $computer:~/.backup/preexec - skipping backup of $computer"
+ R=1
+ continue
+ fi
+
+