Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to pause rsync via command line, if it transfers data for over X minutes? I'm working on using it as a backup and would like it to pause every once in a while to prevent the hard disks from overheating or network throttling. I am currently using a Windows batch file to start a Linux bash script via cygwin to do this.

share|improve this question
So, you cannot run rsync as a daemon, to utilize the --bwlimit switch)? – Christopher Jan 18 '13 at 2:26
@Christopher You do not need to run rsync as a daemon to use the --bwlimit switch. – jordanm Jan 18 '13 at 3:36
Pausing a network command is tricky, you will likely run into timeouts. – scai Jan 18 '13 at 7:11
@jordanm Thanks! Just because I read it under the DAEMON OPTIONS does not mean that it is exclusive to daemon mode. – Christopher Jan 18 '13 at 13:46

If you can get the PID of the process, you can use

kill –STOPpid

to pause the process, and

kill –CONTpid

to resume it.  Check the exit status; if the kill command fails, the first assumption is that the process no longer exists (because it has finished).

share|improve this answer
If you have one rsync instance running, you can get the PID by ps | command grep rsync | awk '{print $1}'. You can run your command in a while script with a sleep function in between. – Bernhard Jan 18 '13 at 6:40
Note however that if you pause rsync for too long, its TCP connection will eventually time out. How long you have depends on how intermediate firewalls are configured. – Gilles Jan 18 '13 at 23:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.