Pages

Tuesday, 25 May 2021

rsync and "sudo"

 Sometimes, it is necessary to run as "root" on the remote server, e.g. to backup files.

SCP command doesn't support privilege promotion on the remote host, while RSYNC does.


e.g.

Assuming user01@remote-host has sudo privilege on the remote server.

$ sudo rsync --rsync-path="sudo rsync" user01@remote-host:/apps/ /apps/

No comments:

Post a Comment