Sync Home Folders with the Cloud

I use multiple machines and a few months ago I found myself trying to find a solution to the old problem of finding that the document you need is never on the machine that you are using.
The reason I didn’t blog before is because this solution warranted some testing and so far it’s been working well!
This solution should work with most cloud systems, I personally tried 2, dropbox and one drive, the only issues i had was with one drive and the limit on path characters (256 characters).
For this blog I will be using Dropbox!
The principal of this process is that you just move your home folder items into your Dropbox, this on it’s own won’t work because the operating system is expecting the home folder to have specific content, specially Desktop and Library folder need to be in there!
To start the first thing you need to do is to setup dropbox on your user account:
Screen Shot 2016-01-12 at 11.21.48
Then you will need to be either be logged in as an admin (not the same user as the one you trying to setup), Recovery partition or single user mode.
With Terminal we are going to move the folders we want to sync to the dropbox folder and then we will create symbolic links to the new location (if you don’t know a symbolic link contains a reference to another files absolute path)
For this blog i used the following folders/commands:
# First log in as root

sudo -s

# Then navigate to the Users Home folder

cd /Users/duck/

# Move the folders you want to sync

mv Desktop/ Dropbox/
mv Documents/ Dropbox/
mv Pictures/ Dropbox/
mv Downloads/ Dropbox/

# Create the links for the folders you moved

ln -s Dropbox/Desktop/
ln -s Dropbox/Documents/
ln -s Dropbox/Pictures/
ln -s Dropbox/Downloads/

You should end up with something like the image below:
Screen Shot 2016-01-12 at 12.00.11
Now all your files in those folders are syncing to dropbox, this now works as a realtime clone and you can also setup another machine with dropbox so you can have those folders in sync between the 2 machines!
Also if you have a problem with your system you just need to reinstall it create a new user and do the same process again and it will sync all the content from dropbox.
Screen Shot 2016-01-12 at 12.02.31
Like I mentioned before I didn’t have any issues using this with dropbox but when i tried one drive there was some files on my system that came up with an error saying that the path was too long, once i removed those files it seem to work fine but i can see that this issue could cause problems in the future.Screen Shot 2016-01-05 at 12.20.30
PS: I’ve been using this solution for 6 months now and had no issues but make sure you have a full backup of your system just incase you do came across any.