2

I currently have Unison installed as a one way sync (mirroring) between a CentOS/Win7 box.

When configured as a one way sync what happens if I change a filename on the source box? Will unison delete the file on the mirroring box and then recopy the file over or is it smart enough to simply rename the file?

Also, what happens if I rename a file on the Mirroring box? Will Unison simply rename that file back to its proper name or will it delete it and resync the file from the "master" box?

I am currently running unison version 2.32.52 on both boxes.

Thanks

Nick M.
  • 351
  • 1
  • 6
  • 12

1 Answers1

2

I believe Unison works like rsync (as it uses rsync code) and therefore does not pick renamed files.

If you change the name of a file on the source box unison will delete the old file and re-transfer the "new" file.

The outcome of changing the name of a file on the destination box depends on how you setup unison. If you have it deleting files that don't exist on the source then your renamed file will be deleted and the original copied from the source again. If you don't have it deleting files that don't exist on the source then the original will just be copied from the source again.

You do have to be careful renaming directories due to the above as it will have to copy the entire contents again although renaming files/folders on both the source and destination before re syncing will usually work fine.

Dogsbody
  • 656
  • 4
  • 15