Is there a default for 'pid file' for rsync in daemon mode?

Chris Green cl at isbd.net
Fri Jan 1 09:57:38 UTC 2021


I just got bitten by a (fairly) subtle problem due to having an
inappropriate location for 'pid file' in my rsyncd.conf.

What I had was:-

    pid file = /home/chris/tmp/pid

This works fine until the system running rsync in daemon mode crashes
rather than being properly shut down.  The pid file doesn't get
removed and rsync doesn't restart because it thinks it's already
running.

My backup system crashed a couple of nights ago due to a power cut
(can't really blame it!) and I went and restarted it after the power
came back.  However, as I note above, files in /home/chris/tmp/pid
aren't cleared out so rsync refused to run when systemd attempted to
start it up.

I guess the pid file should either be in /tmp or somewhere in
/run/user.  However shouldn't there be some sort of sensible default
if it isn't set in rsyncd.conf?

-- 
Chris Green
·




More information about the rsync mailing list