Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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