How to get iCloud like folder sync, everywhere.
After I started using a mac, one of the first things I fell in love with is iCloud. If you have two laptops and switch between often, then the “magical” iCloud document sync is a great feature to have. It has saved me countless times.
The only problem is that iCloud is exclusive to the apple ecosystem. If all your systems are not macbooks, then the benefits are pretty much lost. There had to be a way to achieve that in other “ecosystem”’s.
Since I use Linux on two other machines I own, I started exploring what I can do.
Two way sync solutions
The crux of the problem is to have a solid two way sync solution which is cross platform.
Or at least cross platform on computers. One of the best solutions I found out was InSync. It works on windows, mac and linux. It does cost 40$, but usually runs on discount for halloween and others for around 20$.
It works with Google drive, Microsoft one drive and Dropbox. And you can setup as many accounts as needed.
My preference is one drive for file storage. You can enable two way sync in the desktop user interface.
The iCloud style seamless-ness
iCloud does auto sync for documents and desktop folders.
Once we switch on the two way sync in InSync, by default InSync stores folders in ~/Insync/<your-email-here>/OneDrive/
.
A symlink (or a symbolic link / soft link) is a reference to another file or folder which the operating system respects during path resolution
To attain sync nirvana, all we have to do is delete the default documents folder
rm -rf ~/Documents
and soft symlink the Insync documents path to home folder documents
ln -s -v ~/Insync/<email>/OneDrive/Documents ~/Documents
-s
is for saying its a soft sym link and -v
stands for verbose
Now, all changes to documents auto sync cross computers. Any folder can be setup to sync!
Originally published at https://bharatkalluri.com.