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

Francis.Montagnac at inria.fr Francis.Montagnac at inria.fr
Fri Jan 1 11:05:33 UTC 2021


Hi.

On Fri, 01 Jan 2021 09:57:38 +0000 Chris Green via rsync wrote:

> 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?

Since rsyncd is launched by systemd, I would say that no pid file is
needed: systemd will prevent simultaneous launch of rsyncd.

Can you try without spicifying "pid file" in rsyncd.conf ?

What is the content of the rsyncd.service file on your system ?

On Fedora it is a system (not user) service:

cat /lib/systemd/system/rsyncd.service 
[Unit]
Description=fast remote file copy program daemon
ConditionPathExists=/etc/rsyncd.conf
Wants=network-online.target
After=network-online.target

[Service]
EnvironmentFile=/etc/sysconfig/rsyncd
ExecStart=/usr/bin/rsync --daemon --no-detach "$OPTIONS"

[Install]
WantedBy=multi-user.target

-- 
francis



More information about the rsync mailing list