Auto-sync in GNOME

I really want to just synchronize two directories on multiple machines. I don’t want to worry about IP addresses and things like that and I don’t want to store my private files “in the cloud”. Has anyone done a cute hack using ssh, avahi and inotify for GNOME? Note: I don’t want to backup a folder like DejaDup wants me to do, I want live multi-master replication. Unison also fails for me, as it currently doesn’t work in Fedora 15, and has to be run manually. Ideas?

37 responses to “Auto-sync in GNOME”

  1. Kristoffer Egil Bonarjee

    Sparkleshare? http://sparkleshare.org/

  2. tante

    Sparkleshare? http://sparkleshare.org/

    It’s a free Dropbox clone that allows you to store your stuff in a git repo on your machines.

  3. Alberto Ruiz

    Sparkleshare!

  4. korbe

    Sparkleshare! is write in Mono. Bad Idea :(

    1. anon

      Dude, I think we ended this argument 10 years ago. Get a life.

      1. korbe

        This does not remove the danger posed by Microsoft and its patents.

        1. antimonio

          Using Linux without Mono doesn’t remove those dangers either

          1. korbe

            No, but it reduce.

            Play with Mono is like play with a grenade offer by your ennemy.

          2. antimonio

            (replying to korbe)

            yeah why don’t you go wank yourself with your reduced-patent-danger system on youporn with your proprietary flash plugin

          3. korbe

            (replying to antimonio)

            1: I don’t have Flash Player.
            2: I don’t want to go to youpporn.
            3: I don’t want to go wank.
            4: Stay polite. Thanks.

  5. Janne

    Alberto: neat – didn’t know about that one!

    Though – can you use it to share a folder containing a git repository? Looks a little tricky.

  6. Alberto Ruiz

    @korbe: So?

    @Janne: Share a folder per repository? :-) I do not know about that. It’s meant to replace Dropbox.

  7. Bastien

    I’d say dbus service that uses fanotify to keep a list of changed files across the filesystems, and replicate the files across the network to a separate incremental directory, a-la Time Machine.

    Or make it possible to export btrfs snapshots across the network.

  8. greg

    could always give gluster a shot. you’d configure the two servers as a replica pair, and then mount the export locally. You can also then expand to replica over more servers (not sure what the limit of the replica count is) if you want, and it is default accessible over the network.

  9. axel

    rsync or backintime
    rsync: command line tool for synchronizing
    backintime: powerful gui for rsync with automatic sync function
    or:
    repair the unison-starter with a start-script (I think the autostarter doesn’t work because of systemd)

    [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

  10. Jurgen

    ubuntu one

  11. Stuart

    Have you ever heard of Dropbox? https://www.dropbox.com/

    Far easier to setup than a manual solution, and you can even access your files on a mobile.

  12. Andreas

    There is csync and currently there is a csync daemon and kde client for the daemon in development which I think does what you want to do.

    http://www.csync.org/

    http://git.csync.org/users/cjann/csync.git/plain/doc/userguide/csyncd.html

  13. pel

    Rsync rules. There are many scripts around that are quite neat. Some even do backups and have fallback options.

  14. Jeff Schroeder

    Sparkleshare is also git backed. Without git-annex, thats not a very viable backup or file sync method for large files.

  15. Marc
  16. ulrik

    Just this week, joey hess mentioned the following git-annex-based starter project on his identica:

    https://github.com/chmduquesne/sharebox

    “a distributed FUSE filesystem with offline operations support ” (sounds pretty awesome—when it’s done)

  17. Cyro Nogueira

    Dropbox.

  18. goebbe

    As far as I know Unison has a command line interface and can run automaticically. Of course you have to set the appropriate options in the .conf file. I used Unison to automatically make an update on a backup-server on my girlfriends laptop, once a day and the setup worked for years, without manual interaction.
    But perhaps I did not quite get what type of solution your are looking for?
    If you are looking for something that makes efficient updates, say once per hour, Unison might be worth to be considered.

  19. Aurélien Gâteau

    For what it’s worth, I put together a thin wrapper around git to implement that:

    https://github.com/agateau/deveba

    I have been using it to sync documents and pictures from two laptops and a desktop machine. One of the laptops is my wife’s laptop so one of my goals was to ensure no special manipulations was required (that is, until there is a conflict…)

    It is not inotify-based, I just run it from cron.

    Has Jeff said, it is not a good solution if you want to sync large files. I investigated integrating with git-annex, but my understanding of git-annex was that it was difficult to integrate seamlessly (I don’t want to have to run git-annex commands to get my files)

  20. ben

    unison is pretty good, but it’s not automatic.

  21. Dan Winship

    “Unison also fails for me, as it currently doesn’t work in Fedora 15, and has to be run manually.”

    No, that’s how unison works. It doesn’t do live syncing, it just syncs when you tell it to.

  22. James

    Drbd and GFS2. Maybe a little overkill, but works beautifully. At least on my two servers.

  23. chris

    >I really want to just synchronize two directories on multiple machines.
    >I don’t >want to worry about IP addresses and things like that and
    >I don’t want to store my >private files “in the cloud”.

    This is the same I want.

    You could have a look at:
    http://git.csync.org/users/cjann/csync.git/plain/doc/userguide/csyncd.html

    The GUI is written for KDE but the daemon only needs a c compiler.

    But it’s not finished yet and I have still a lot to do.

    [WORDPRESS HASHCASH] The poster sent us ’0 which is not a hashcash value.

  24. lefred

    and trying to port unison to Fedora 15 ?

    Then you can use something like : EeepcSync, a script I wrote to sync some folders between my laptop and my eeepc

    http://www.lefred.be/?q=node/95

  25. nona

    That’s the holy grail for me too.

    Live async multi-master replication. And oh yeah, disconnected mode, because of laptops.

    Contenders are unison, csync (with pam_csync to replicate on login and logout), chironfs (fuse based).

    Things I’ve looked at too were DRBD, Zumastor (seems dead now, but some ddsnap concepts are going in-kernel in devicemapper), Coda, InterMezzo (never went anywhere), etc.

    In the end, unison has always been most reliable for me.

    In practice, there’s a lot of stuff you shouldn’t sync when syncing home directories.

    Syncing gconf/dconf is problematic (especially if you want exceptions for different machines). Maybe a one-file-per-key backend would help – but I guess that would slow things too much.

    Proper use of XDG_*_DIRs would also be helpful:
    - Epiphany still does too much in ~/.gnome2/
    - FireFox and Thunderbird also mix caches and settings too much)
    - ~/.thumbnails, ~/.fontconfig etc

    Well – enough said.

  26. Vadim P.

    … well, for the rest of us, using cloud-based backup ala ubuntu one, dropbox, spideroak and many others works just wonderful.

  27. John

    If you don’t mind closed source there’s AeroFS [1]. It has optional backup to the cloud, but works just fine without it (default). It’s still in alpha, but I can give you an invite.

    On the vcs-home mailing list [2] there’s been a lot of discussion [3] about dvcs-autosync [4]. It aims to to provide automatic keep dvcs in sync with each other. It has been described as being similar to SparkleShare, but without Mono and a GUI.

    [1] http://www.aerofs.com/
    [2] http://lists.madduck.net/listinfo/vcs-home
    [3] http://lists.madduck.net/pipermail/vcs-home/2011-March/000314.html
    [4] http://gitorious.org/dvcs-autosync

  28. Adlan

    what about utilizing bittorrent for that, like twitter’s murder or https://github.com/russss/Herd?

  29. Pedro Côrte-Real

    Aerofs does something like this. They’re not open-source and are in beta still.

  30. Chad

    I’ve used Unison to perform automatic synchronization in the past. There is a “batch” options that can be set in a Unison for this purpose. Also a Unison profile can be created rather than specifying everything on the command line, if you wish. The options available in the preferences section of the Unison manual can be used in the the profile.

    http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html#profile

    Use “batch = true” in the profile or “-batch” option to automate the synchronization. Other options can be specified to control behaviour. For instance, in my case, I specified “prefer = newer”. These options would depend on how you want to resolve conflicts.

    I just did this with two systems, but I’m pretty sure it could be extended to more. I would think that with multiple hosts it would best be accomplished by coordinating changes via one primary host. Primary host actions sync to all hosts and all secondary hosts would only initiate sync with primary. This should propagate changes to all hosts with minimal issues.

    I’ve also had success using incrond. With this you can make use of inotify if you find this more useful then scheduling in cron.

    I tried Unison on F15 and the -ui text option seems to work.

    –CS

  31. Peter Robinson

    lsyncd uses rsync with fnotify

    http://code.google.com/p/lsyncd/

    I would like to see a follow up post on what you finally choose

Bad Behavior has blocked 2769 access attempts in the last 7 days.