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

Chris Green cl at isbd.net
Fri Jan 1 11:31:11 UTC 2021


Francis.Montagnac--- via rsync <rsync at lists.samba.org> wrote:
> 
> 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
> 
You're quite right, simply removing the 'pid file' setting from
rsynd.conf seems to work perfectly.

Maybe this should be noted somwhere in the rsyncd.conf man page.

-- 
Chris Green
·




More information about the rsync mailing list