[ale] Syncing two machines

Jeff Lightner jlightner at water.com
Wed May 2 10:47:11 EDT 2007


rsync lets you specify "source" and "destination".  Source does NOT have
to be the machine you started rsync from and destination CAN be on the
machine from which you started.   

That is to say you can do just as easily run EITHER: 
rsync localhost:dir remotehost:dir  
-OR- 
rsync remotehost:dir localhost:dir
   
(Obviously you'd need more flags - just giving simplistic syntax to
illustrate the source destination pairing).

-----Original Message-----
From: ale-bounces at ale.org [mailto:ale-bounces at ale.org] On Behalf Of Greg
To: ale at ale.org
Freemyer
Sent: Wednesday, May 02, 2007 10:02 AM
To: Atlanta Linux Enthusiasts
Subject: Re: [ale] Syncing two machines

To the best of my knowledge, rsync always uses a master/slave
relationship

(at least on an invocation by invocation basis).

So the slave (for a given invocation) can be updated from the master,
but not vice versa.

If you can keep your timestamps in sync it should be possible to use
"over-write only if newer" type logic to implement some form of
bidirectional sync, but it sounds dangerous to me.

ie.
invocation 1) update all older laptop files from newer desktop files
invocation 2) update all older desktop files from newer laptop files

Note that rsync can also delete files that exist on the slave, but not
the master.  So like many Linux tools, rsync has all the power you
need, but it may not have all the safe-guards you want.  And those
safe-guards it has have to explicitly requested at the command line.

FYI: I also have just really started using rsync in a significant way.
 It has an amazing number of command-line arguments and functions.  I
am using it to keep a local archive of my files in sync with an
offsite repository.  So far has done exactly what it was supposed to.
I have just had some issues because of the far end computer not being
very reliable.  ie.  Dozens of timeouts in my transfers over the last
week,.  (But none in the last 24 hours :))

Greg

On 5/2/07, Brad Peters <brad at endperform.org> wrote:
> I have a laptop and a desktop, and what I want to do is keep a few
> directories in sync.  I can use rsync for this,   It's been a while
since
> I've used rsync, but if I were to sync from my desktop to my laptop
(given
> that my desktop has an empty dir and the laptop has the files I want),
it
> would copy from the laptop over, or vice versa.  If so, then that
might be
> what I want.
>
> Does anyone else out there do syncing between desktop / laptop?  If
so,
> I'd love to hear what you're using.  Eventually I want to write a
script
> to check if the desktop is online from the laptop and automatically
> perform a sync.
>
> --
> Brad Peters [sent via webmail]
> brad at endperform.org
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>


-- 
Greg Freemyer
The Norcross Group
Forensics for the 21st Century
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale



More information about the Ale mailing list