-2

I am using rsync to copy data from machine A to machine B over a network. If rsync fails while copying the data from A to B, will the data at B get corrupted ? Does rsync has any inbuilt mechanism to tackle this data corruption ?

1 Answers1

4

It does have a built-in mechanism. The new file will be created with a temporary name, and will only be renamed to the "real" filename once it's completely transferred.

You should read the rsync man page for more information about this, including ways to override it.

Jenny D
  • 27,780
  • 21
  • 75
  • 114
  • I went through the official documentation, but could not find this thing anywhere. If you can please refer the source that justifies this built-in mechanism, it will be really helpful. We cannot proceed with rsync unless we confirm this mechanism with some official sources. – Apurva Agrawal Apr 24 '19 at 06:45
  • https://linux.die.net/man/1/rsync - search for the word "temporary". Or look at te actual source code. – Jenny D Apr 24 '19 at 07:18