LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Two-way syncronize on fat32 directories over network (https://www.linuxquestions.org/questions/linux-networking-3/two-way-syncronize-on-fat32-directories-over-network-520559/)

Koppie 01-18-2007 11:57 AM

Two-way syncronize on fat32 directories over network
 
I have a desktop and a laptop. I dual-boot both with windows and linux (although I'm about 99% linux at this point). I keep my personal files on a fat32 partition so it can be read and written by either linux or windows. I keep a copy of all my personal files on the laptop and the desktop and I like to synchronize them.

With windows this was pretty easy after Microsoft came out with their Sync Power Toy. I know solutions exist for linux but I've been unable to get any of them to work.

I tried Unison but it had problems with the permissions on my files. I suspect this has something to do with using fat32 but I'm not sure. I tried running it with sudo but that didn't help. Also, I have like 35 gigs of files to go through and Unison takes a long time. Rsync is much faster at the same task. (I'm not talking about actually copying all 35 gigs, I just have to look through the directories to see what DOES need to be synchronized.)

I've tried rsync but there are two problems: (1) it's too difficult to set up, and (2) it only does one-way synchronization. Here's how I've tried to solve these problems:

(1) I've created a script file to synchronize three different directories. For each one, it does a dry run and reports the results, then waits for my approval, and then does the actual sync. The problem is I'm not much of a scripter and it's already getting difficult.

(2) I could have my script synchronize everything one way, then synchronize it the other way. The problem with this is if I move or delete a file and then do a double sync, the file will reappear. Sometimes the latest version will be on the laptop, and sometimes the latest version will be on the desktop. I need to be able to sync both ways at the same time.

Any ideas? Thanks in advance!

lucktsm 01-18-2007 12:11 PM

Mount the drive using cifs.

Then on the Linux side use cp -ru to sync the one way....
Then do it the other way...

Koppie 01-19-2007 01:11 PM

Actually I think my solution will be to use Unison.

Turns out Unison has problems reading fat32 partitions. But I can switch my partition to NTFS or ext3 (Linux support for NTFS has gotten better, and there is limited Windows support for ext3 now). Also, Unison only runs slowly the first time, in order to build the database, then it speeds up. Finally, I think using the CLI (command-line interface) was making Unison run slower; it seems to run faster when I use the GUI.

A big part of my concern is true synchronization. Rsync and cp simply mirror the directories. If I move or delete a file, I want that change to be reflected too. Looks like Unison is the only solution for that, and it should work fine if I change the partition format.

Thanks anyway for your help, I never would have thought of cp -ru on my own!


All times are GMT -5. The time now is 03:20 AM.