Forgot your password?

typodupeerror
Data Storage Desktops (Apple) Media Software

Synchronize Data Between Linux, OS X, and Windows? 305

Posted by timothy
from the please-be-more-specific dept.
aaaaaaargh! writes "I'm using a laptop with Ubuntu 8.04 for work, a netbook with Ubuntu 9.10 when I'm outside, Mac OS X 10.5 for hobby projects, and Windows XP for gaming. For backups, I'm currently using Jungle Disk and Apple's Time Machine, and I use a local svn repository for my work data. Now I need to frequently exchange and synchronize OpenOffice and Latex files and source code in various cross-platform programming languages between one machine and another. Options range from putting everything online (but Jungle Disk disks seem to be too slow for anything else than backup), storing my data on external media like USB sticks or SD cards, or working with copies by synchronizing folders over the network. I don't want to give my data away to some server outside without strong encryption (controlled by me, including the source code) and external media like USB sticks are a bit too fragile according to my taste. The solution should be reliable, relatively failsafe, as simple as possible, and allow me to continue to use Jungle Disk for backup. So what would you recommend?"
This discussion has been archived. No new comments can be posted.

Synchronize Data Between Linux, OS X, and Windows?

Comments Filter:
  • Rsync? (Score:5, Informative)

    by Misanthrope (49269) on Thursday November 19, 2009 @05:33PM (#30163932)

    Set up one computer as a server and rsync/ssh to it with either a cron job or at your whim.

  • Unison (Score:5, Informative)

    by samuraiz (1026486) on Thursday November 19, 2009 @05:33PM (#30163944)

    I like Unison [upenn.edu] for this sort of thing.

  • dropbox? (Score:5, Informative)

    by kperrier (115199) on Thursday November 19, 2009 @05:34PM (#30163954)

    www.dropbox.com

  • Re:dropbox? (Score:2, Informative)

    by rinoid (451982) * on Thursday November 19, 2009 @05:35PM (#30163984)
    The two posts above are my two suggestions. ssh+rsync and/or dropbox.com
  • Dropbox (Score:5, Informative)

    by rtobyr (846578) <tobyNO@SPAMrichards.net> on Thursday November 19, 2009 @05:39PM (#30164084) Homepage
    https://www.dropbox.com/ [dropbox.com] will give you 2gb of free space. It'll keep all files in your "dropbox folder" synchronized on all computers where it is installed. It works on Linux, Mac, and Windows. A video on installing Dropbox on Linux from The Linux Journal's Shawn Powers is here: http://www.linuxjournal.com/video/dropbox-linux [linuxjournal.com]
  • Re:dropbox? (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @05:39PM (#30164098)

    Dropbox is great. I use it between all my computers (PC and Linux) and I have absolutely 0 complaints with it!

  • Dropbox (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @05:40PM (#30164118)
    I personally use Dropbox [dropbox.com] for a similar type of setup (Ubuntu 9.10, OS X 10.6, XP). It uses SSL, but would most likely not meet your requirements of allowing you control of the source code that sits on their servers. It provides 2 GB of storage for free with the option to upgrade to 50 or 100 GB for $9.99 or $19.99 respsectively.
  • by aclarke (307017) <{ac.ekralc} {ta} {maps}> on Thursday November 19, 2009 @05:40PM (#30164122) Homepage
    Three options that I use, or have used, are rsync, Chronosync [econtechnologies.com] and Jungle Disk.

    Jungle Disk is the best solution if you have more money than time and can rely on being online a reasonably good percentage of the time. In the Jungle Disk settings, you can specify a certain portion of your disk to be used as an offline cache. Jungle Disk will then keep downloaded files in that disk cache, so you don't have to worry about the download speed so much, assuming you have the disk space available for the cache. If you don't have the disk space you'll need an online solution anyway.

    Chronosync is Mac-based, but you can set it up to sync your files with your Windows and Linux computers. I recently bought it and haven't been through all its features yet, but I'm pretty sure it will do everything you need it to for about $40.

    Rsync is of course great if you have the time and expertise to set it up. If you want to take the time to learn how it works, it's probably the best solution. OTOH I think Chronosync will do 99% of what rsync will do (from what I've seen) and is easier so I felt like the purchase price of Chronosync was worth it to me.
  • Re:Rsync? (Score:3, Informative)

    by godrik (1287354) on Thursday November 19, 2009 @05:44PM (#30164170)

    of course you can. the ssh support was added on the top of rsync. It originally used the rsyncd daemon which I believe do not use encryption. (similar to rlogin for authentification)

  • by frooddude (148993) on Thursday November 19, 2009 @05:45PM (#30164202)

    Unison from UPenn http://www.cis.upenn.edu/~bcpierce/unison/ [upenn.edu]

    Works on all the platforms you mentioned... It can synchronize 2 disparate directory trees (you made updates to files A, B, C on one system and D, E, F on another system and want to merge them) and when it can't figure out what to do it asks you.

  • SVN+SSH (Score:3, Informative)

    by nweaver (113078) on Thursday November 19, 2009 @05:46PM (#30164208) Homepage

    Set up one computer as a master repository and do everything over SVN+SSH.

    Its what I do for the complete working set I have, passing between 3+ systems, is everything is through subversion over SSH to a backed-up system.

  • by MichaelSmith (789609) on Thursday November 19, 2009 @05:46PM (#30164216) Homepage Journal

    Mercurial [selenic.com] for...

    Windows [berkwood.com]

    MacOS [berkwood.com]

    For linux it should be in standard repos.

    This way you can make changes on any of your systems and move them around as required, merging only when needed.

  • Unison (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @05:46PM (#30164228)

    If you don't mind having to manually synchronize (and even this limitation can be worked around with a careful set up), I'll say Unison over SSH. It handles circular version conflict resolution quite well, it's not too difficult to setup if in the chain there's only a windows machine (so you don't need to setup a ssh server on the win box) and it's serving me very well. I don't know about OSX but I think it should work there good enough.
    It has a nice GUI too to manually resolve nasty conflicts (e.g. you modified a document in on two different environments before the sync.)

  • SpiderOak (Score:3, Informative)

    by DesertBlade (741219) on Thursday November 19, 2009 @05:57PM (#30164430)
    Been using it for awhile, works great windows, Linux and Mac. Also you don't have to place files in the dropbox folder, you can choose what folders to sync and backup. The also have zero knowledge of your files, which I find reassuring.
  • Re:Unison (Score:5, Informative)

    by nine-times (778537) <nine.times@gmail.com> on Thursday November 19, 2009 @06:01PM (#30164512) Homepage

    I second the suggestion. It's basically like rsync except it's more like real synchronization. What I mean is, AFAIK with rsync you basically have to say, "Sync folder A and folder B by assuming that folder A is the copy I want to keep, and changing only folder B." With Unison, on the other hand, you can say, "Sync folders A and B by keeping track of when files get modified, and keeping the most recent version of each file. If a file has been modified in both folders since my last sync, let me know and ask me what to do."

    One minor annoyance is the project page links to an OSX version that includes a Cocoa interface, and that's kind of a pain if you want to script it to run in the background. Even if you call it from the command line, the GUI will still open up. Also, if you install it from MacPorts, it doesn't do a good job of maintaining resource forks. Of course, if you're syncing to Linux or Windows, you might not care about resource forks.

    I think the best place to get the OSX version is here: link [haifa.ac.il]

    It's been a while since I've downloaded it, though.

  • Re:Unison (Score:4, Informative)

    by McPint (127046) on Thursday November 19, 2009 @06:05PM (#30164576) Journal

    I cannot say whether unison is the best solution, but it is one that I have been using for 7 years or more, between two desktops (home and work), a laptop an external hard drive and another offsite backup. These were on a variety of filesystems between Linux and Windows flavours. MacOS X should be no different.

    While I have seen graphical interfaces to unison, the command line interface is so much easier to use.

    I would definitely recommend unison... while it is not a revision control system it is an effective solution at working on the same set of files wherever you are provided you synchronise twice a day.

  • Or dont' throw money (Score:5, Informative)

    by goombah99 (560566) on Thursday November 19, 2009 @06:07PM (#30164614)

    I;m a little confused if you are syncronizing, mirroring or backing up data. the title says synch, but time machine and jungle disk are more for backup, and at most can be used for mirroring a master rather than synching.

    If you want to backup, take a look at Crashplan. It's got two unique features the other plans lack. 1) you can backup to your own physical media, not theirs. This solves the problem of how do you backup and restore say 200GB of data in less than a month to a remote service. if the disk is yours you do the initial backup locally, them move the disk to the remote location for incremental backups. And then you do the reverse when you need to do more than in incremental restore. 2) they will sell you just the software-- a one time cost-- and you don't have to pay for a monthly remote service cost unless you want to. in which case you just backup to a freinds computer that is hosting your disk. Your data is both safe and remote (and encypted) but you can also go get the drive is if you need it using your toyota rather than the internet.

    On the other hand if you want syncronization then look into Unison. It appears the source forge project is not highly maintained but also mature enough to work well. it is cross platform and scriptable.

  • Dropbox (Score:3, Informative)

    by PhunkySchtuff (208108) <kai@autom a t i c a . c o m.au> on Thursday November 19, 2009 @06:08PM (#30164634) Homepage

    https://www.dropbox.com/ [dropbox.com]

    "Free for Windows, Mac, and Linux"

    Creates a folder that is kept in sync between different computers. You can share files with other dropbox users too via shared folders. 2GB or so of space is free. It also keeps multiple versions of files so you can go back to a previous version of a file if you need to.

    I don't have any affiliation with the company, other than being a satisfied user.

  • Re:SVN+SSH (Score:2, Informative)

    by agent-o2 (923169) on Thursday November 19, 2009 @06:11PM (#30164692) Homepage
    Then he must not realize that SVN can do everything he's wanting to do.
  • by Rantastic (583764) on Thursday November 19, 2009 @06:19PM (#30164782) Journal

    I use a local svn repository for my work data. Now I need to frequently exchange and synchronize OpenOffice and Latex files and source code in various cross-platform programming languages between one machine and another.

    Am I missing something here? What doesn't SVN do that you need? Clients exist for all named platforms and it handles OO, Latex, and source code files very well.

  • Re:Unison (Score:2, Informative)

    by samuraiz (1026486) on Thursday November 19, 2009 @06:22PM (#30164832)

    Unison works much better due to its 2-way change propogation, but it is only designed to handle 2 sources of documents, not 3.

    I sync between 3 computers using a hub-and-spoke system. My file server is the hub; my desktop and laptop both sync only with the file server.

  • by evilad (87480) on Thursday November 19, 2009 @06:31PM (#30164952)

    Seconded. I use Unison between Linux and OSX with no trouble, and used Win32 in the past as well. It isn't perfect, but it's closest by a wide margin.

  • Re:Rsync? (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @06:34PM (#30165012)

    You don't even need to set up one as "the server". With the right options, mutual rsyncs between them will be fine.

  • Re:Rsync? (Score:5, Informative)

    by frodo from middle ea (602941) on Thursday November 19, 2009 @06:42PM (#30165108) Homepage
    Better yet, Setup ZFS on a opensolaris box, export the ZFS volume as NFS/Samba share or as an iSCSI target, access from Linux,Solaris,Windows etc.
    ZFS can also do compression, and automatic snapshots, not to mention rock solid data integrity with raidz2
    • data integrity - check
    • remote access - check
    • automated incremental backups - check
    • No limitations of software raid neither the need for expensive hardware raid - check
    • Dead Simple to Use - check

    Seriously what more do you want from a storage/backup solution ?

  • Re:Rsync? (Score:4, Informative)

    by Shikaku (1129753) on Thursday November 19, 2009 @06:59PM (#30165404)

    luckybackup is a gui for rsync and allows you to sync folders.

    I use it to quickly backup everything. It doesn't allow versioning, but I use squashfs-tools to remove all redundant files and compress them with lzma. So I have a folder system of dates for versioning in a highly compressed squashfs file system container, that's mountable.

    sudo apt-get install luckybackup squashfs-tools

  • Re:Unison (Score:5, Informative)

    by coaxial (28297) on Thursday November 19, 2009 @07:03PM (#30165450) Homepage

    I agree, unison is great. I used unison for several years to sync machines. It worked great for linux-linux, and seemed to mostly work for linux-mac/mac-linux syncs as well. The main problem was with resource forks causing a bunch of ._foo files, but there's not too much you can do about that if you're copying data from HFS+ to something else. It's been a while since I used unison (I gave up my desktop, and now only use a laptop.), but seems like unison has the ability to actually merge files by fire off something like meld [sourceforge.net] to resolve conflicts. That's a big win.

  • by formfeed (703859) on Thursday November 19, 2009 @07:34PM (#30165866)
    I second Unison. A "tiny" problem if you're using Unison: It can mess up filenames that have non-ASCII characters.

    That problem is mentioned all over the net, what's not mentioned is that the problem stems from transfers across different OSs.

    A suggestion that might be a work-around : Sync Windows to a smb share, and use unison locally on that directory.

    I am not using windows, so I'm fine. But, I also can't guarantee that my suggestion works.

  • Re:Rsync? (Score:4, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @07:35PM (#30165868)

    Better yet, Setup ZFS on a opensolaris box, export the ZFS volume as NFS/Samba share or as an iSCSI target, access from Linux,Solaris,Windows etc.

    Note that newer releases of OpenSolaris have built-in kernel support for CIFS with ZFS.

      # zfs set sharesmb=on mypool/mydata
      # zfs set sharenfs=on mypool/mydata

    Mapping between Unix UIDs and Windows SIDs is done transparently, and you can change things from the Windows GUI if desired and the ACLs will go live on the Unix side as well: SIDs are first class security objects. None of the usual Samba UID/SID kludginess (though (Open)Solaris comes with a Samba package if you want to go that route.)

    Case-(in)sensitivity is also a user toggle away if so desired.

    De-dupe was also recently committed to the code base. Crypto is being worked on and I think patches are available.

  • Re:Rsync? (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @07:42PM (#30165964)

    Do not forget about data de-dupe as well.. now you can have multiple copies of the data from point in time saves and it occupies less space.

  • Re:Unison (Score:1, Informative)

    by Anonymous Coward on Thursday November 19, 2009 @09:37PM (#30167140)

    Rsync has many options, which you can apply to amazing ends if you become an rsync wizard. Before I explain some of them, consider that setting up a CVS or SVN repo behind SSH might be the easiest thing to manage "some openoffice files, latex, and sourcecode". I even use CVS to manage my own calendar files.

    With rsync you can use timestamps and -u (update) mode to only transfer from A to B if A is newer. You can run once in each direction to transfer a sparse mixture of files you have modified at either site. You lose if both sites are "newer" than the last sync time, as you will not detect a conflict.

    With rsync -n (no modification) you can simulate a transfer, review the affected file list, and intervene with special cases before you let it destroy data. With --exclude and --include patterns, you can selectively copy only certain files you wanted from a complex tree.

    You are playing with fire if you do any of this without a backup system which can allow you to recover from an rsync mistake.

  • by rgrbrny (857597) on Thursday November 19, 2009 @10:17PM (#30167380)

    Time Capsule works well.

    Time capsules appear to have a MTBF of ~18 mos; the power supply dies. Apple will replace it via an APP-covered computer that uses it, but not if you crack the case to get the hard drive out.

    So, either eat the $$ after 18 mos to save your 18 mos of backups, or give Apple your data for a refurbed unit, or find a backup solution for your backup solution.

    I'm not buyin' another one.

  • Re:Unison (Score:3, Informative)

    by ColoBikerDude (947706) on Thursday November 19, 2009 @10:17PM (#30167384)
    I use Unison to synchronize data between 5 user accounts across 3 computers, all running Mac OS X, and I'm very happy with it. I set up a LaunchAgent from each of the user accounts to automatically run a Unison profile periodically, and that profile can also be run from the GUI tool if so desired.
    The Cocoa interface can be disabled if you're writing a script to run in the background. There is a "-ui text" flag to the command line tool (/usr/local/bin/unison) that will prevent the Cocoa GUI from being shown, and also a "-batch" flag that keeps it from expecting user input. Finally, an "-auto" flag will accept the default action for any files without conflicts.
    And no, I'm not affiliated with the author. ;)
  • Re:Rsync? (Score:3, Informative)

    by fm6 (162816) on Thursday November 19, 2009 @10:55PM (#30167572) Homepage Journal

    You're going to have some file semantics issues in any case. Those introduced by CIFS (don't see how ZFS is a factor) are pretty easy to deal with.

  • Re:Rsync? (Score:3, Informative)

    by jhol13 (1087781) on Friday November 20, 2009 @12:29AM (#30168052)

    Better yet, use Mercurial (or any other distributed version control system). It is designed for this kind of use!

    I have three clones (of a project), one in desktop, one in laptop and one in an USB stick. Just "pull" (or "push") and "commit". Sometimes a "merge". With network connectivity you do not need the USB stick (in my case it is just a bit easier).

    Should any of those clones/repositories die it would not be a big problem.

    Note: this is not a backup solution, this is a solution to sync the machines!

  • by itsme1234 (199680) on Friday November 20, 2009 @12:45AM (#30168170)

    They are way beyond dicks and would go to unbelievable lengths not to provide you with the service you bought. They are proactively scanning your account and will shut you down (without ANY warning whatsoever) for any media file that look suspicious (that includes mp3's you recorded yourself, as in you're the artist).
    At first when they started cracking down on people using disk space they just shut down everybody that was using "too much" in their opinion (they were specifically offering 1500 GBytes space and 15000 GB/month transfer at the time - now they are "unlimited"). No questions, nothing. When customers asked they said they modified the TOS and say something like "you're not allowed to store files (!)". They also modified the TOS to say they don't have to notify you when they modify the TOS (which they had accordingly to the old TOS). And they didn't notify anybody, just shut down accounts randomly.
    If you use their whois privacy feature (default on and unmanageable via web interface) they will spam your whois with advertising. They also don't seem to get what this feature actually means and insist that you own the domain which can't be true in any legal and meaningful way (yes, you are the owner in a field in their database but legally and as far as ICANN is concerned they are the owner).

    The last drop in the bucket is the hidden 50000 files limit. The limit is absolutely secret and you can find about it only when you are kicked out or warned that you are above. However they would still insist the space is unlimited but the number of files is limited. And that it is for your own protection because fsck would take far too long if you have too many files. And that if you don't like it you should go away.
    The idea here is only to pay, not to use what you paid for.
    To put things into perspective a default installation of gallery with default plugins will eat about half of those 50000 files you are allowed. And use probably a couple tens of megs of space (keep in mind they were offering 1500GB before going unlimited which should mean for any reasonable person more than 1500GB). Oh, and people hosting linux distributions are abusers as well.
    Of course they would work more flexibly than a random free provider (you get shell access but you need to fax your ID!). But between random crashes and this "anybody using is abusing" policy you won't get too far.

    Stay away from bluehost.

  • Re:Rsync? (Score:1, Informative)

    by Anonymous Coward on Friday November 20, 2009 @02:06AM (#30168610)

    Or if OpenSolaris doesn't feel right for some reason (e.g. hardware support), FreeBSD ZFS support is working very well these days.

  • Re:Rsync? (Score:1, Informative)

    by Anonymous Coward on Friday November 20, 2009 @05:10AM (#30169142)

    was this ment to be funny? massive AES encrypted data i think is quite hard on a processor

  • by tyroneking (258793) on Friday November 20, 2009 @05:45AM (#30169326)

    Unison is quite stable and I use it daily to sync between Linux PCs over a network and Windows PCs via a USB key - add some flags to allow it make some decisions automatically and 99% of the time it works silently - add a cron/WindSchedule to it and it works a bit like Dropbox.

  • Re:Rsync? (Score:2, Informative)

    by Kagetsuki (1620613) on Friday November 20, 2009 @06:59AM (#30169616)
    I actually had terrible problems with ZFS, a piece of hardware went bad on a ZFS volume distributed over multiple disks, and despite the fact it was supposed to be able to recover from that but instead it decided to just stop working all together. This was about a half year ago, we've now moved back to individual networked disks and one box on the network regularly rsyncs them to a backup-only RAID-5 array off site twice a day. ZFS would be great if it had actually worked, luckily we had all the data on other discs and managed to re-assemble everything and lost maybe max an hour of work.
  • Two options for you (Score:3, Informative)

    by plazman30 (531348) on Friday November 20, 2009 @02:02PM (#30173954)

    If you're willing to pay, you could use Dropbox. If you keep it under 2 GB, it's free. Anything you drag into your dropbox gets synced to their servers and then synced back down to your other PCs you have linked to your dropbox account.

    If you would prefer a roll your own solution, and are willing to build a server, then go look at Novell's iFolder http://www.ifolder.com./ [www.ifolder.com]

    Andy

... when fits of creativity run strong, more than one programmer or writer has been known to abandon the desktop for the more spacious floor. -- Fred Brooks

Working...