Syncing Files
Hello,
We have to sync 2 directories. The problem is both the directories are huge. Directory A is 40GB and Directory B is 3 GB. We want to sync Directory B to A. We would like to do the following: 1) Both A & B has lot of same files and directories with different time stamps. If B has an updated directory or file we would like to sync that to A ( overwriting those in A ) . If A has the updated one, then that file shouldn't be synced. 2) Sync all files / Directories in B that are not present in A to A. 3) We have to ensure no data loss. How is this done? Can this be done with "rsync". Please provide the different options of rsync for this. Regards Shankar |
Yes, rsync is very good for this.
Read Everything Linux - A Tutorial on Using Rsync and rsync examples (and other pages at rsync.samba.org). Then study man rsync. |
Hello,
thanks for the reply 1) ".............................If A has the updated one, then that file shouldn't be synced." can this be achieved with rsync? how is this done ? "-c" option with rsync? regards Shankar |
You want the option
Code:
-u, --update skip files that are newer on the receiver |
You might want to look into using unison instead. This sounds like just the kind of thing it's designed for:
http://www.cis.upenn.edu/~bcpierce/unison/ |
Thank You SecretCode! -u option did the trick
Appreciate it. Regards Shankar |
All times are GMT -5. The time now is 01:31 PM. |