Wednesday, January 28, 2015

How to sync files between multiple computers (made simple)




Do you have more than one computer and wish your files could 'magically' travel between them.

Or do you need to share files between co-workers and clients, without having to attach them to emails?

This blog entry explains two simple ways to accomplish this.


This blog post is written with a Linux Mint user in mind, but the concept of syncing files between computers in not limited to just Linux Mint. It is very easy to sync files between two Linux computers, and  Windows computers, and Apple, and so forth. 

So, your are probably asking 'what is this file syncing stuff, and how can I use it?'.

The 'What is it' answer is
File Syncing can allow you to add, delete, change, rename, or move a file in a special folder on one computer, and that change is also made, automatically, in the corresponding folder in all your computers that access that sync. So if you change a file on your home computer, then your changes will also be saved on your offices computer, and your laptop, and any other computer that shares that sync.

As for the 'how can I use it' part;
let me give you 3 made-up examples. These may give you some ideals as to how file syncing can work for you.

Example 1:

In  this make believe example; John is a contract worker for ABC home improvements. He goes to a work site, takes pictures of the project with his cell phone, and takes notes using a pen and paper. Before he leaves the site, he also takes a picture of his notes. Next, he goes to a nearby cafe for lunch, and to use their free WiFi connection. He only has to make the connection to the Internet, the software agent on his cell phone will take care of the rest.

The pictures are automatically copied to folders on both the offices receptionist's PC (running Linux Mint), and to the Big Boss's PC (running Windows) at his house.

The receptionist looks at the picture of John's notes, type them into a LibreOffice document, and save the document back into that same folder.

At the same time, the Big Boss is reviewing the pictures, creates a word document granting his approval and any additional notes, and saves it back into the same folder.

John also has access to all these files, and can add new ones, but is unable to delete or modify any that already exists (security reasons).

The receptionist and Big Boss do have rights to delete and/or modify any documents or pictures.

The software agents on all 3 devices keep track of all the files, and copy them to to the folders on each.

This also has the added benefit of the data being on multiple computers at different locations, in case one should fail to boot, or is stolen, or the building burns to the ground, etc.

In this case, there is a copy of the folder in 'the cloud', that has a one-to-many relationship to both computers, and John's cell phone. Additional computers and cell phones can easily be added to this.

Example 2:
Mary has a small business in which she assist others with writing books. She currently has 7 clients, and a separate folder for each on her hard drive. Each client has a identical folder on their own computer. Mary is using Linux Mint. Some clients use Linux, others use Windows, and one uses a Mac. Any files added, changed, renamed, moved, or deleted in any of these folders, either by Mary or her client, is automatically changed in the other synced folder. The clients can not see the folders of other clients. Each client's folder has a one-to-one relationship with its partner on the other computer. Mary simply has 7 different software agents on her computer, keep track of 7 different one-to-one synced folders.

Example 3:
Mike is a very busy guy, and seldom has an Internet connection. He is a part-time college student, and a small business owner. He uses a Mac at home, carries a Linux Mint net-book to class and work, and sometimes uses his girlfriends Windows computer at her place. But instead of syncing all 3 by an Internet connection, Mike uses a 64 gig USB thumb drive. When he sits down at one of the computers, he inserts the thumb drive, runs a short utility to sync, and then unmount and remove the thumb drive. The thumb drive is synced to a folder called 'MikeSync' on each of the computers. At the end of his 'session' he repeats this procedure. This way, Mike is sure that he has the most recent copy of his files at the start of his session, and has all updated files at the end. He also has the added benefit of having his data at 3 different locations, just in case one should fail to work any more. This has become habit to him, and he seldom even thinks about it. In this example, the thumb drive has a one-to-many manual sync to each of the 3 computers.


There are many different ways to set up a sync like these, but in order to keep things simple, I will only explain two of the more common ways here.



DROPBOX
https://www.dropbox.com/

For the above examples 1 and 2, DROPBOX can do the job. As of the time I'm writing this blog entry, you can get a free DROPBOX account, which can hold 2 gigs of data. You can also get a 1 TB account for $10 a month, or a Business account for about $15 a month. All you need to do is create an account on their web site, and install a software agent on the computers that need to share the files. There are Dropbox agents for Windows, Linux, and Mac.

Your files are saved in a secure location in 'the cloud' and synced to any of your computers when they connect to the Internet. Any files that are added, changed, renamed, moved, or deleted on any of the computers, will be reflected on all the other computers using the account.

To create a dropbox account, go to the above web site, and follow the sing-up link.

You can download the dropbox agent from the Linux Mint repository. Install it the same way you would install any other package using the Software Manger.  Just search for 'DROPBOX'. If you are unsure how to do this, this article can help: http://www.linuceum.com/Desktop/installingAppsFromMintSC.php
You will be prompted for your dropbox account information and password. The software agent will create a Dropbox folder in your home folder, this is the folder that will be synced.
For the Windows or Mac versions of the agent, consult the Dropbox website for downloads.

You can have more than one of these agents running on your computer at any one time. This allows you to have one account for your personal use, and one for business. Or as in example 2, one for each of your clients. If your are interested in doing this, here is a very good article explaining how to do this
http://niftylettuce.com/posts/multiple-dropbox-instances/

There are also versions of the dropbox agent for I-Phone and Android. This allows you to take pictures with your cell phone, and when you get a WiFi connection, are uploaded to your dropbox account.

IMPORTANT:
if you have large files, or files that are changed often, and you have limits on Internet bandwidth or maybe a 500 gig monthly limit, dropbox can eat up a lot of your resources. If you exceed your allocated amount of data during a month, some plans charge you extra fees. Uploading and downloading large files can eat up a lot of time and money. Something to thing about.



FreeFileSync
http://sourceforge.net/projects/freefilesync/

This would be an ideal solution for the above example number 3. This utility will allow you to sync a folder on your hard drive to a folder on a USB thumb drive. It will keep also keep track of any deleted and modified files. This would be a manual processes (not automatic like Dropbox) but if you get into a routine habit of doing this procedure at the beginning and end of each 'session' it will do the same job as Dropbox.

This software is free, but any contributions to the project would be much appropriated. It can be downloaded for free at the above website. There are versions of it for Windows, Linux, and Mac. It is fairly easy to setup and use. Documentation (if you need it) can also be found at this website.

This way of syncing files does NOT use the Internet, so it can be used during times you don't have a connection. It also avoids any data usage fees. And it is VERY fast as it will only copy files that have been added, changed, or deleted since the time of the last sync. The amount to data you can sync is limited only by the size of your hard drive and your USB thumb drive.  I recommend also getting a second USB thumb drive of the same size as a backup just in case your primary should fail (it does sometimes happens).



So, which one do I myself use?
The answer is.....Both.
I have a free Dropbox account to allow pictures from my phone to automatically wind up on my laptop and net-book.  For everything else, I use FreeFileSync and a 64 gig USB thumb drive. I sync between my net-book, laptop, and a desktop workstation. Each system has a folder called SYNC on it, which is the folder synced between systems. Anything I'm working on, I save in that folder.
I carry one USB thumb drive with me. I keep a second in a safe place as a backup copy, which I refresh about once a week.


As I said, there are two of the simpler solutions to sync files between computers, and are the most commonly used. If nether of them truly fit your needs, I suggest that you do a Google search on  “file sync software”  to find others.


A WORD OF WARNING:

There is something you need to keep in mind if you set up a sync like this.

In Linux, file and folder names are case sensitive. That means that the file names   mydata, MyData, and Mydata   are all very different files.

However, in Windows, file and folder names are NOT case sensitive. That means that the file names   mydata, MyData, and Mydata   are refer to the exact same file.

This can a BIG problem if you are syncing between a Linux and Windows systems. So, the best practice is to make sure that all folder and file names, on both our Linux and Windows computers, are NOT case sensitive. That is to say, instead of    mydata, MyData, and Mydata   you should use file names like   MyData1,  MyData2,  and MyData3.


That's it for this time. Good luck and have fun.


No comments:

Post a Comment