Provide access to ~/Messages folder to rsync?
I'm running Catalina, and I have a launchd job that runs an rsync script that backs up my Messages to a server over ssh. It effectively runs this command:
/usr/bin/rsync -av --stats /Users/jay/Library/Messages/ Home.local:/Groups/Archive/Messages/Messages/ --exclude chat.db*
Now, I have given Terminal "Full Disk Access", so this command runs fine when I run it manually in Terminal, but when I load the launchd job, I get this output in system.log:
"building file list ... rsync: opendir "/Users/jay/Library/Messages/." failed: Operation not permitted (1)"
If I REMOVE "Full Disk Access" from Terminal and try to manually run the command, I get the same error. When I look in System Preferences → Security & Privacy → Privacy, there does not seem to be an option for adding processes for Messages. I don't think it's wise to grant Full Disk Access to rsync.
So, how do I grant access to the Messages folder to rsync when being run by launchd? Do I have to grant Full Disk Access to rsync?