clsync-start-rsyncdirect.sh 315 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. mkdir -m 700 -p testdir/from testdir/to testdir/listdir
  3. cat > rules <<EOF
  4. -d^[Dd]ont[Ss]ync\$
  5. +*.*
  6. EOF
  7. case "$(uname -s)" in
  8. GNU/kFreeBSD)
  9. OPTS=''
  10. ;;
  11. *)
  12. OPTS='-p safe'
  13. ;;
  14. esac
  15. sudo $(which clsync) -K example-simple -M rsyncdirect -w2 -t5 -W ./testdir/from -R rules -D ./testdir/to $OPTS $@