0

If I use the following command:

rsync -r <source> <dest>

it only reads the files from source? Such that if all of the source directory were read-only, it should never have a problem, is that right?

  • @sudodus I think Kusalananda got the idea – Alexander Mills Jun 19 '18 at 18:12
2

The only time rsync deletes files from the source is when you use the option --remove-source-files. See the rsync manual on your system for more info on this option (its semantics was changed in release 3.1.0).

  • Thanks, since I have control of which rsync commands get run, hopefully none of my end users' files get modified or deleted lulz – Alexander Mills Jun 19 '18 at 18:12
  • 1
    @AlexanderMills That could still happen if you use --delete (or --delete-excluded with some --exclude pattern) and you manage to confuse source and target (I've done that). Always test run on throwaway data. – Kusalananda Jun 19 '18 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.