Hello, I want to synchronize two local directories, but if in the destination directory there are some files that has most recent modified time than the source directory I want that the source old files than the destination will be updated. Is it possible? Thanks for helping me. Best regards, --- Ivan -------------- next part -------------- HTML attachment scrubbed and removed
On Sat, 2008-08-30 at 19:18 +0200, Tyler Durden wrote:> I want to synchronize two local directories, but if in the destination > directory there are some files that has most recent modified time than > the source directory I want that the source old files than the > destination will be updated. Is it possible?You can use the -u option to avoid replacing destination files with older source files, but you will need a second run in the reverse direction to update the source files. You may prefer a two-way synchronization tool such as Unison ( http://www.cis.upenn.edu/~bcpierce/unison/ ). Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20080830/b868b412/attachment.bin
Ivan, please CC rsync@lists.samba.org so that your messages are archived for others' future benefit. On Sun, 2008-08-31 at 11:40 +0200, Tyler Durden wrote:> I already now the behavior of the -u option, but I want to know if > other option exist to do this. How you say me that is not possible I > want to suggest that the -u option would do this action in future > changes since in man pages acclaim.I'm quite certain that the -u option is not going to change to do a two-way synchronization in a future version of rsync. Use either two rsync runs (rsync -u dirA/ dirB/, rsync -u dirB/ dirA/) or a tool such as Unison that is designed for two-way synchronization. Matt -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part Url : http://lists.samba.org/archive/rsync/attachments/20080831/161a1f8d/attachment.bin