вторник, 18 мая 2021 г.

rsync from non root user

 On the destination server set in the /etc/sudoers file next:

username ALL= NOPASSWD:/usr/bin/rsync

and on the source server run:

rsync -avz -e "ssh" -rsync-path="sudo rsync" /data/source  username@dest_host:/data/target