dropbox – Yet Another Bug https://yetanotherbug.com A Lazy Documentary of my Projects and Thoughts Wed, 04 Jan 2017 00:53:28 +0000 en-US hourly 1 https://wordpress.org/?v=4.7.2 Sync your files in real time… https://yetanotherbug.com/sync-your-files-in-real-time/ https://yetanotherbug.com/sync-your-files-in-real-time/#respond Thu, 13 Aug 2015 02:27:48 +0000 http://yetanotherbug.com/?p=51 AKA the long and winding road to find a decent tool to keep all the platforms on my development environment synced. Lately I have been looking for a solid program to sync my projects’ files across my computers… I work from home so I did not need an office/home solution however I am on my desktop during the day

The post Sync your files in real time… appeared first on Yet Another Bug.

]]>
AKA the long and winding road to find a decent tool to keep all the platforms on my development environment synced.

Lately I have been looking for a solid program to sync my projects’ files across my computers… I work from home so I did not need an office/home solution however I am on my desktop during the day and my laptop at night… plus sometimes I find myself on my Mac for an iOS project and need to access some of my other files from there as well. I started reviewing a few different solutions based on my needs:

  • Decentralized sync
  • Multiple devices
  • Multi platform
  • Real time sync
  • Option to sync ANY folders (not only the default one)

Optionally I would have liked some kind of version control or backup (I can get distracted and destructive at times) and for it to be open source.

I have used Dropbox for my personal files for years now but it is neither decentralized nor it gives me the option to sync any folders of my liking, it just sync the default “Dropbox” folder across computers, also it has a limited space and that would not work for me.

The first software I found is Syncany by Philipp C. Heckel. It is still an alpha version and it is very unstable but I loved the unobtrusiveness of the interface which is mainly command line based and the option to connect it to different storage types via plugins.

The way Syncany works is simple, first you download and install the plugin for your storage of choice including WebDAV, FTP, SFTP and even Dropbox!  Then you just add a folder you want to sync either in the command line (docs here) or via the wizard. Finally copy the provided folder code and use it on your other devices to link the synced folder. It’s a relatively straight-forward process and Syncany provides basic versioning and the option to browse through the files history and retrieve an old copy if needed. The simplicity, versatility and lightweight of Syncany really made me gloss over the fact that it wasn’t a decentralized solution though it had enough plugins to have backup storage alternatives in case the primary one failed retaining consistency throughout the whole system. I loved Syncany so much I donated to the developer because I really hope to see a 1.0 version soon, however it ultimately proved to be terribly unstable and not fully able to handle conflicting files which started spawning conflicting copies of conflicting copies, probably due to the speed at which files get updated in an active development project… Basically a hot mess… So I had to abandon the Syncany ship.

syncany_scheme

Bittorrent Sync became an obvious alternative in it’s 1.x incarnation. P2P, decentralized, multi platform, the more devices the better, sync in real time and unlimited number of folders to potentially sync! Ding ding ding… We have a winner… Until Bittorrent came up with 2.0… They introduced a bunch of features such as account/devices pairings so that signing up in all of your devices with one account you could automatically keep your folders in sync, dynamic management of permissions and ownership on folders, admittedly some neat stuff.. except that you have to pay a monthly fee for it… or you have very basic, very stripped down version of the “real” application and, oh yes, a 10 folders cap. Let’s remember also that being a decentralized P2P option it does not rely on servers hence rendering the monthly fee a little fishy… I am all for paying for software, hell I am a developer after all, but I never really believe in a monthly fee, unless of course there was a monthly service. This way I am basically paying royalties to use a software that runs entirely on my system. Not cool Bittorrent… However I found BT Sync to be extremely stable and reliable at doing its job so much so that I used it for a few months for free, the deal breaker for me has been to restrict the permission/ownership control of a folder only to the original owner with the option to transfer ownership only if you have a premium account. Also only the owner of a folder can generate the code to “share” the folder with another client this complicates things when you have no access to the device that shared the folder first… Not only that, every time I formatted, uninstalled or upgraded my system, reinstalled BT Sync and linked it to my shared files it would add the new client as a completely new user showing my old BT Sync installations as offline users and of course no one can revoke clients access to any folders unless they are the owners and have a premium account… Pretty sloppy.

bittorent_sync_scheme

Let’s say that BT Sync is an excellent solution if you are willing to setup your development network once and don’t foresee any major change. It gets the job of keeping your files in sync done very well comparably to Dropbox and it’s very unobtrusive. If you are looking for some more fine tuning like I did however it is just not right, unless of course you are willing to pay royalties to Bittorrent (again, not cool).

At this point I was getting pretty discouraged as the vast majority of syncing options out there are way to raw, paid centralized services or single folder sharing systems Dropbox style… What I ended up using in the end is Syncthing which is pretty much all that I liked from Syncany with all that I could accomplish with BT Sync… Although not without a little bit of haking, but more on this in a minute.

So Syncthing is:

  • Decentralized [CHECK]
  • Multi platform [CHECK]
  • Runs on multiple devices [CHECK]
  • Syncs any number of folders [CHECK]
  • In real time [CHECK]
  • It’s Open Source [CHECK]
  • Supports versioning and backups [CHECK]

Not bad! So the straight-up vanilla version of Syncthing is an executable which will start a the program in a command prompt (if you are on Windows) this was my first disappointment… I don’t want to have to start it on every machine every time I start my system… What if I simply forget (very very possible option)? Well fortunately if that is the only issue there are extensive guides online on how to setup the Syncthing executable as a service and run it at boot. So that problem is solved… Now you have a BT Sync type of software running at startup which GUI can be accessed via browser at localhost:8384 (by default)… however still no tray and notifications… But we are in luck again! Since ST is open source you can find a bunch of wrappers that use the same core executable here for pretty much any platform under the sun. My favorite Windows one is SyncTrayzor which works as a jack-of-all-trades providingan installer. auto-start, built-in browser, tray icon, folder watcher, and more… Once you install and configure SyncTrayzor you’ll pretty much obtain a free, open source, BT Sync. NICE!

syncthing_scheme

A decentralized system is awesome as changes are propagated across all clients in real time as long as 2 or more are connected to the network, however that means that if you don’t always have at least 2 devices on at all time some changes might be lost or not synced correctly resulting in conflicting file… To solve this problem I installed a simple executable on my Linux server and configured it to start at boot and run in a detached terminal (there is no daemon yet) with the help of dtach. The server is on at all times and continuously listens for updates to the shared folders providing the benefits of a centralized setup to the system.

I also wrote a simple step by step of how I configured my computers that can be found here.

The post Sync your files in real time… appeared first on Yet Another Bug.

]]>
https://yetanotherbug.com/sync-your-files-in-real-time/feed/ 0