0

What is the command to LOCALLY Rsync a bunch of folders that by default rsync doesnt have the necessary rights for. (in the terminal i have to sudo rsync for that matter). But in a shell script it works a little different.

I have been reading about

rsync --rsh-path="sudo rsync" -aq... 

and another said:

rsync --rsh="ssh me@Mac sudo" -aq... 

And all the others are talking about remote rsyncing. but none of local ones seem to work.

Someone can shine a light on this? cheerz!

mnagel
  • 6,729
  • 4
  • 31
  • 66
joland
  • 1,191
  • 2
  • 8
  • 7

1 Answers1

0

if you work locally just run rsync with escalated rights and leave out all the other options like so:

sudo rsync -avP source target

you can replace -avP of course to fit your needs about what information gets transferred and what output is generated.

mnagel
  • 6,729
  • 4
  • 31
  • 66
  • this doesn't do anything for rsyncing locally with different rights. Rights, which are set to: _mysql:wheel by-the-way. The tcsh file i am using to initiate the rsync holds the rights joland:staff. I am taking mac here. – joland Oct 08 '13 at 10:08