Using rsync to mirror directories where root owns file, using non-root user to initiate session
ms at citd.de
Fri Jun 22 02:51:06 MDT 2012
On 20.06.2012 22:26, PEOPLES, MICHAEL P wrote:
> I have spent a day researching and attempting to debug this issue. I am hoping someone can tell me how (or disabuse me of the delusion that it's possible) to do the following:
If running a command as root via sudo is acceptable. I had the exact
same problem 2 days ago. I had to backup a machine where i only got a
user-login, with sudo privilege.
So after some googleing i tried (As root on the target machine, but
you can also sudo that):
rsync -avPxHz --delete --numeric-ids --rsync-path='sudo rsync' -e ssh user at remote:/ ./
and it worked, of course that only works if (remote) sudo doesn't ask
for a password.
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.
More information about the rsync