Apr 24, 2012

Start and stop rsync at determined hours


I want to run rsync over an adsl connection, only when i’m not using it (from midnight to the 6am).
The download of the files has to stop on 6am, and resume on midnight. There are both huge files (hundreds of GB) and little ones (a few GB).

How can i do it automatically?

Asked by cedivad


I would simply suggest using two crontabs

  • one that starts the transfer with for instance “–partial –update” (and possibly others)
  • one that kills the transfer (something like) “kill $(ps aux | grep ‘[r]sync’ | awk ‘{print $2}’)”
Answered by Jontas

No related posts.

Leave a comment