Supply password to rsync
Via environment variable
Use environment variable RSYNC_PASSWORD
to provide password to rsync command
export RSYNC_PASSWORD=$PASSWORD
rsync -zvr source destination
or
env RSYNC_PASSWORD=$PASSWORD rsync -zvr source destination
Via password file
rsync --password-file=rsync_pass -zvr source destination
Some other methods
Such as sshpass
and public key.
References
How can I rsync without prompt for password, without using public key authentication?