Fedora Linux Support Community & Resources Center
  #1  
Old 19th January 2005, 10:21 PM
deech Offline
Registered User
 
Join Date: May 2004
Posts: 17
sync files two way direction

hi,

how can i sync files between 2 pc's.. It's mainly for backup purposes, but the concerning files can be edited on both machines....

Here's my setup:

a desktop pc with a FAT32 dir containing my photo's. I edit my photo's on this PC.

a laptop with linux also containing the same photos on a ext3 part.. I also edit photos on this machine and take them with me to show to ppl.

Is there a way to sync the files between these 2 pc's. If i change a photo on my fat32 partition it should be synced to my laptop and the other way around....
(i hope this makes sense)

anyone who can help?

Greetz,

deech
Reply With Quote
  #2  
Old 20th January 2005, 03:07 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
rsysc does very good incremental file transfer, and I think it can go both ways. Frequently it's used to mirror websites and things. Not sure how helpful the examples are, however.

Anybody have a two-way rsync backup script they could share?
Reply With Quote
  #3  
Old 11th February 2005, 04:58 PM
7_Dots Offline
Registered User
 
Join Date: Feb 2005
Location: Cleveland Ohio
Age: 28
Posts: 1
rsync is a uni-directional tool, or mirroring tool. The program you want is called unison


http://www.cis.upenn.edu/~bcpierce/unison/index.html
Reply With Quote
  #4  
Old 2nd January 2006, 06:38 PM
kd_pease Offline
Registered User
 
Join Date: Jan 2006
Posts: 3
It's true that a single run of rsync is one way, but for a 2 way sync using rsync you should be able to use:

#Copy updated files from local to remote machine
rsync -e ssh -vr /path/to/local/dir remote-hostname:/path/to/remote/dir
#Copy updated files from remote machine to local machine
rsync -e ssh -vr remote-hostname:/path/to/remote/dir /path/to/local/dir

You can drop the -v if you want - it just provides more info about what's going on.

You can run it from either of the 2 machines as and when required.
Reply With Quote
  #5  
Old 2nd January 2006, 07:19 PM
CrystalCowboy's Avatar
CrystalCowboy Offline
Registered User
 
Join Date: Sep 2004
Posts: 536
Yes, you can run rsync from either end. The complication is that if you have files A, B and C in your directory, and you most recently edited file A on host1 and most recently edited file B on host2, rsync needs to know that it should not overwrite a file on the target that is newer than one on the source. It appears that the -u option might turn that trick.

I typically run rsync with the -avz options for Linux-to-Linux, which preserves symbolic links and file creation times. If one filesystem is FAT32, I would substitute the -rltv options. rsync can be run from one directory to another (even with a remotely mounted disk) or over the network. See the man page for a good summary.

I am not familiar with the unison application, I presume it figures out for you which host has the newer version of a file.*

You didn't specifically mention, but is the PC with a FAT32 disk running Windows? You can get rsync for Windows if you are running Cygwin. Rsync comes standard with Linux, and is available for most brands of Unix, including MacOS X.

update:
* I checked out that web page for [/b]Unison[/b], and it claims to do just that. The down side is that it is not included with Linux and does not have a lenghty positive track record, as rsync does. I presume if it does what is claimed for it, it should catch on nicely.
__________________
Explore the Core!

Last edited by CrystalCowboy; 2nd January 2006 at 07:25 PM.
Reply With Quote
Reply

Tags
direction, files, sync

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do the updates repos xml files get out of sync with reality ?. markdk Using Fedora 2 12th July 2009 04:03 AM
Pocket pc Toshiba - e355 want to access files on it, don't need to sync foomanchew Hardware & Laptops 0 31st March 2006 05:47 PM


Current GMT-time: 06:14 (Sunday, 26-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat