I'm automating backups via a
bash script. The script is executed via
cron. The script archives directories recursively using
tar, and then
rsync's them to the remote host. Here is a sample:
... for PATH in $DIRS do ... tar -cpvzf $FFILE $PATH --exclude-from /tmp/excludes ... rsync -az --partial --rsync-path="sudo rsync" $FFILE mybackupserver:$REMOTEFILES ... done ...
rsync is invoked, a new process (and therefore PID) is spawned for each one, obviously.
If I kill the process that started the script, will the child
rsync processes also be killed off immediately? Or will they run until completion, and no further ones will be spawned thereafter?
I'm reluctant to interrupt the
rsync processes mid-stream.