rsync in cron on Catalina no longer working
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 [email protected]: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.
Solution 1:
This requires adding cron
to the Full Disk Access list.
Open System Preferences : Security & Privacy : Privacy : Full Disk Access
Both rsync
and cron
must be included on this list. Before Catalina, listing only rsync
would work. On Catalina, rsync
by itself only lets you run rsync
by hand. For it to work within cron
, 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 choose cron
)