I am running this command from terminal and it works well. Files ares uploaded to the remote server without having to type any password.
rsync -avz -e "ssh -i /home/me/.ssh/id_rsa.pub" --delete /home/me/backup/bin/backup/bio firstname.lastname@example.org:backups_bio/ --log-file=$HOME/rsync.log
But if I run it from crontab I am getting this error :
2019/08/08 16:04:02  rsync: connection unexpectedly closed (0 bytes received so far) [sender] 2019/08/08 16:04:02  rsync error: unexplained error (code 255) at io.c(235) [sender=3.1.2]
And the upload doesn't work.
Why doesn't it work when launched from Crontab?
I am using ubuntu 18.04 LTS