Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a removable hard-drive where I keep a backup of most of my files, and while I can solve some little issue I also keep a copy of some directories in both Ubuntu and Windows partitions. After several installations and change of computers some of these files have been accumulating and, many times, they get duplicated when I move some of them in one system and not in the other.

Is there any tool available in Ubuntu (or elsewhere) that will allow me to make changes in the directories in one system and then replicate them in the other systems?

I mean, after I rename files, move them from one subdirectory to another, or add or correct metadata in a media file (thus changing the hashes), in one of the file systems, the changes can be replicated to the other copies.

One possible method is

  1. copy one filesystem (source) into the other (destination);
  2. find duplicates in destination;
  3. manually or programmaticly remove duplicates in destination;
  4. erase the source filesystem and copy the files and structure from the destination file system.

This procedure would be very time consuming with a large file system (hundreds of thousands of files expanding to some 300~400 GB), and finding duplicates cannot be done automatically if one of the copies have been modified (v.g. because metadata has been corrected, or a minor edit was done in a document)

Thank you in advance.

share|improve this question
    
I was about to suggest the use of rsync, which is an efficient tool to synchronise two directories, but on second reading: you seem to want a method to synchronise two directories while changes can have occurred at either side, correct? In other words, this is not a backup scenario. Then how will you go about resolving conflicts, such as a file which has been modified at both ends, or a file which has been added to a directory at one end, while the directory was removed at the other, etc? –  zwets Oct 5 '13 at 20:32
    
Correct: changes can occur at either side. I understand that conflicts would be dealt manually: except for the initial setup I don't expect conflicts to be too frequent and too many. –  Carlos Eugenio Thompson Pinzón Oct 5 '13 at 20:59

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.