You can pause any program by sending it a TSTP
(polite) or STOP
(forcible) signal. On the terminal you've run rsync
in, pressing Ctrl+Z sends TSTP
. Resume with the fg
or bg
command in the terminal or a CONT
signal.
It is safe to kill an rsync process and run the whole thing again; it will continue where it left off. It may be a little inefficient, particularly if you haven't passed --partial
(included in -P
), because rsync
will check all files again and process the file it was interrupted on from scratch.
There may be unusual combinations of options that will lead to some files not being synchronized properly, maybe --inplace
with something else, but I think no single option will cause this.
If you disconnect your laptop and reconnect it somewhere else, it may get a different IP address. Then the TCP connection used by rsync would be severed, so you'd have to kill it and start again. This can also happen if you suspend your laptop and the TCP connection times out. The timeout will eventually filter out to the application level, but it can take a while. It's safe to press Ctrl+C and run rsync again.
rsync -avh
simply loose the current file being copied, if the file is large you've lost quite a lot of time. MaybeCtrl+z
moving the temporary file (start with a dot) and thenCtrl-C
rsync might be a better solution. – malat Oct 01 '14 at 08:49bg
to put process to the background, not to stop. – Jari Keinänen Jul 03 '16 at 19:14--partial
is what I needed. I'm trying to copy 21GB of data, and among these I have a 6.6GB file. The problem is the network kills my connection after a few GB of data transfer, for which--partial
is exactly what I need. – adentinger Nov 28 '18 at 18:13