I have various rsync entries in crontab
that worked reliably right up until the moment I upgraded to Catalina.
00 04 * * * /usr/local/bin/rsync --archive /Volumes/FOO me@remote.example:BAR
Here rsync
is installed via brew install rsync
(and it is still the correct version post-upgrade). And it doesn't much matter where rsync
is going: from a remote server to my local disk, from one local disk to another local disk, from my local disk to a remote server. The jobs simply do not work.
Copying/pasting the exact command out of crontab and running it directly does work, though.
Adding -vv
to the cron job, I see that the list of files being evaluated simply isn't complete. Whole directories are excluded. Some files are listed… some files are not listed.
Best Answer
This requires adding
cron
to the Full Disk Access list.Open System Preferences : Security & Privacy : Privacy : Full Disk Access
Both
rsync
andcron
must be included on this list. Before Catalina, listing onlyrsync
would work. On Catalina,rsync
by itself only lets you runrsync
by hand. For it to work withincron
,cron
must also be on the list separately.(In the Full Disk Access preference pane, hitting Command+Shift+G will allow typing
/usr/sbin/
in order to then choosecron
)