[sf-lug] What's the best way to sync two laptops?
Rick Moen
rick at linuxmafia.com
Tue Nov 29 11:19:05 PST 2011
I wrote:
> Quoting Michael Shiloh (michaelshiloh1010 at gmail.com):
>
> > I now have two laptops which I'll use somewhat interchangeably.
> > What's a good way to sync work between them?
>
> rsync over ssh.
Here's an incredibly primitive example that should nonethless suffice to
show the basic concept:
:r! grep rsync /etc/crontab
3 15 * * * root rsync -e "/usr/bin/ssh -i /root/.ssh/svlugbackup" -ax "lists.svlug.org:/var/local/mailman/archives/private/{jobs.mbox,officers.mbox,smaug.mbox,speakers.mbox,svlug-announce.mbox,svlug.mbox,volunteers.mbox,web-team.mbox}/" /usr/local/src/rickstuff/svlug/mboxes
At 3:15 AM every night, my server pulls down from SVLUG's mailing list
server copies of the cumulative mbox files for all of the group's GNU
Mailman mailing lists, for backup purposes. Given that those mailing
lists have been in continuous operation since 1997 and the largest of
them has had over 50,000 postings, the mboxes are pretty large:
:r! ls -lh /usr/local/src/rickstuff/svlug/mboxes/
total 374M
-rw-rw-r-- 1 469 469 4.3M Nov 15 15:44 jobs.mbox
-rw-rw-r-- 1 469 469 16M May 12 2011 officers.mbox
-rw-rw-r-- 1 469 469 12M Nov 17 19:30 smaug.mbox
-rw-rw-r-- 1 469 469 2.5M Sep 25 2006 speakers.mbox
-rw-rw-r-- 1 469 469 1.2M Nov 1 14:31 svlug-announce.mbox
-rw-r--r-- 1 469 469 180M Nov 28 14:42 svlug.mbox
-rw-r--r-- 1 469 469 25M Nov 26 10:52 volunteers.mbox
-rw-rw-r-- 1 469 469 4.7M Oct 26 11:11 web-team.mbox
Therefore, it's particularly handy that rsync sends over the wire only
the _diff_ between what it already has and what's at the remote end.
It never ceases to amaze me that so many people immediately think, when
contemplating these sort of problems, of outsourcing to Dropbox and then
stop any further discussion -- when they already have rsync at home.
Possibly of additional interest:
http://blog.hacker.dk/2008/10/dropbox-is-not-open-source/
http://fak3r.com/geek/howto-build-your-own-open-source-dropbox-clone/
More information about the sf-lug
mailing list