71 views

Syncing your data on multiple machines

By Benjy | Posted, February 20th, 2010 and modified on August 2nd, 2010.
[Translate] A lot of people use more than one computing device, working on a document when at work and on the same thing at home entails either carrying it  around in a pen drive or a USB disk or emailing it to yourself. Many times you end up with multiple  copies of the same file [...]

A lot of people use more than one computing device, working on a document when at work and on the same thing at home entails either carrying it  around in a pen drive or a USB disk or emailing it to yourself. Many times you end up with multiple  copies of the same file saved here and there and it leaves you unsure about which one is current, or your mailbox full of attachments. A pen drive can be lost or misplaced and a USB hard drive can in addition be dropped and be damaged. Some drives might come with vault programs, but in these times of multiple operating systems, you cannot be  sure if it will run on the Mac and on Linux . A cure to all these ailments is of course to use a Notebook/Laptop and lug it between your home and office. It has its advantages, built in battery backup etc.. but heavy users will also know of the down side…

…heavy to carry, cramped keyboard, bad posture, lower back problems etc… Another effect of the crash of market prices of  laptops has been the decrease in build quality. Laptops now are not as sturdy as they used to be years ago and models keep changing very fast. Many of them go dead with heavy usage, end up with damaged hinges or the boards go kaput. A simple solution (what I do at work) of course would be to use a desktop monitor and a USB keyboard/mouse and operate it like a desktop, however I prefer the sync method to keep my data up to date. This is basically a log of the different methods I’ve tried and what I’m currently using.  There are four ways in which this can be approached.

  1. Reduce the size of your laptop  ;-) by separating your hardware (processing power) from your Apps & Data and carry your Apps/Data with you on the  go -on removable media.
  2. Use a third party server or your corporate server to hold your data and use scripts or other third party software to keep your folders in sync.
  3. Works like the above, but is an offline solution using a directly connected USB hard disk or pen drive. (A pen drive is pretty sluggish compared to a USB Hard disk)
  4. Dissect your data and decide on which parts are important to you and use free software/services to keep those parts in sync.

I’ve tried the first option here and these are the cons… I can’t think about any pro’s like I did when I first posted the article on portable Apps:

  • If running from a pen drive, the FAT32 filing system has no security. Even if the NTFS or ext4 filesystem should be used on the USB hard disk, any knowledgeable person should be able to change the file permissions/take ownership of the files and view them. You could encrypt it with truecrypt or some other software, but you’d need to keep installing it on all your guest computers.
  • The programs themselves are unprotected, unlike when they are run as an installed application from an operating system (run as a limited user). Often the pen drive/hard disk gets infected and there is no reason why the application itself should not get compromised or taken over by a malicious program.
  • Pen drives can be lost or stolen and hard disks when dropped almost always fail.
  • Worst of all, you are at the mercy of a possibly compromised Operating System. Its nice to know that your browsing history is safe on your pen drive, but nothing stops a keylogger on an unprotected computer or other malicious program from stealing your credit card number/banking information  through a keylogger. This is true even if you are using an SD Card as your App/data container with its write protect tab on!!
  • If you want to do this, I suggest you download/write a live CD of Ubuntu, boot from it, and then access your data!

For the second approach,  you need access to your office server via ftp, ssh, or need to have purchased space on the Internet. Here you can use Syncback to accomplish ftp sync with the server or rsync via ssh to accomplish the same.

Syncback is easier to setup, but is available only for Windows. I have however successfully wined it on Linux. As per my experience, I found it suitable more for backup from a single machine to a server than for syncing (both ways) from multiple locations.  Often if the time stamp was screwed up (Particularly on using different   operating systems on both ends), on a two way sync I’d end up with old data mysteriously reappearing and current data vanishing. I’ve messed up similarly with rsync and once had my all my music disappear into never never land. I however successfully use Syncback on my computer to back up my website (one way) to my laptop since plugin upgrades occur regularly and it is always easier and quicker to backup only changed files.

Here is the Syncback log file when I use it for backing up my site. This is however a an example of a one way sync. Ideally we need a reliable two way sync.

In the above screenshot, you can see the three possible scenarios that a backup of my website would present:

  1. Not in Source, Destination copied : My computer is setup as source, so this is basically telling me that a new file was found on my site and that was copied to my backup.
  2. Not in destination : Here a redundant plugin has been deleted on my site. Syncback has in turn deleted the file from my local backup.
  3. Destination Copied : This file has not changed, so Syncback has ignored the file.

In option three, Syncback and rsync also work in a similar way (and obviously faster) between a PC and a Pen drive or USB /firewire hard disk. You can use it as a backup device on both the computers. (like above, I would usually set it to delete files deleted from the source so I had an exact replica of the source on my disk). However the danger of the software  misunderstanding the date/time stamps mentioned above  is always everpresent on two way syncs, especially on dissimilar operating systems, computers with unsynchronised clocks or more so when wined under Linux, as you never know for sure how it will work as it was meant only for Windows!

Option four is what I am currently using… (I’m currently running Ubuntu 9.10 Desktop, you could probably adapt this technique for Windows or the Mac too.)

Here it is in detail, I first dissected my data and made a list of what I wanted to synchronise..

  1. Very few files -files I was currently working on -not more than five including drafts of my posts.
  2. My Firefox bookmarks
  3. My personal accounting software (GNUCash) data
  4. My RSS Feed list (I’m using Liferea)
  5. My Addresses book from Evolution
  6. My recipe manager Database (Gourmet)
  7. Documents relating to personal planning.
  8. My Personal emails -(official emails can wait till morning -it is very important to divide time rightly between work & Home -else its just a matter of time before your “homework” causes your work life to suffer!! I wish more bosses would learn that and receive better productivity at work :smile:
  9. My Calendar.

The first part was to figure out what  free  online resources were available for use, I found four solutions.

  • I switched from “Gmail POP” to “Gmail IMAP”. Now I could have copies of email in three (or more) places and whatever I did in each of the places would reflect in all the others automatically… On the web at www.gmail.com on my notebook at work and on my Desktop at home! Agreed Gmail’s IMAP is a bit sluggish, but its fair enough.
  • I installed Mozilla’s weave plugin.It syncs my Bookmarks, Preferences, Passwords, Tabs & History. So my work browser is identical to my home browser & perfectly in sync.
  • Initially I synced my Evolution calendar with my Gmail Calendars. I soon found this tedious, slow and unreliable, so I switched to Chandler Desktop.

Three items were struck off my list. Next I evaluated Ubuntu one and realised that in its current avatar it was totally unreliable for any work or home related purposes, in the future it would be a good bet for Linux users as they can sync their Evolution contacts, Tomboy Notes and a folder called Ubuntu one in their home folder free to a limit of 2 Gb. It aslo has a web based interface accessible on the Net to manipulate your data online.

I checked online for similar solutions and I found two instances of Dropbox. One was a GPL based (written in Perl) implementation and the other a commercial derivative (probably) going by the same name. Dropbox does similar things that Ubuntu one does but has a lot of additional features such as maintaining older file versions of your documents, something like what Vista does. The best part however is that it works on Windows, the Mac and on Linux, so you could sync between two or more computers having differing operating systems.

The method I used for syncing my remaining data is identical for all the left out items on my list. As an example, I am showing you how I sync my feed list on Liferea. You can adapt it for the other examples on my list or sync your own requirements. I have chosen here to sync a single file, but you can do the same for a whole folder. (That is what I had to do to sync my GNUcash data)

Before we start, a first a few pre-requisites…

  1. I assume you’ve installed Dropbox for Linux, created an account and have it working. You can get Dropbox here! (Dropbox is available for the iPhone too! )
  2. You must have run the program at least once. Some programs will not create a configuration directory if you have not run it at least once.
  3. Open your home folder and press Ctrl  H to display  hidden files and folders
  4. Change over to the directory that contains what you want to sync (In my case ~\.liferea_1.6\feedlist.opml)
  5. Open the Dropbox folder. In my case I have created a sub directory called Data… now…

The reason that I am synchronising only the feed list instead of the whole folder is that, like Ubuntu One, Dropbox has a free limit of  2Gb only, so you have to be choosy of what you want to put into it. I’ve now got my recipe database, GNUCash data, Lifera feed list, Firefox data, Evolution Address book, Calendar and Gmail, synced to my satisfaction  and have stopped carrying my laptop home. I always have my data waiting ahead of me at home or at work!  :smile:

Notes:

When using automatic folder synchronization like Ubuntu one or Dropbox, Make sure that the service has finished synchronizing your data before you shut down your system. It could get pretty messy if you modified your accounts data at home & reach office and continue to work on it without realising that the data is not current as the sync never completed because you logged off the net or shut down your computer before it happened! You can check the icon of the program as it changes when it is syncing.

I had some issues with Dropbox when running on Ubuntu 9.1 (Karmic). This has happened about  three times. On logging into Ubuntu, I get an error message asking me to download and install Dropbox. No matter how many times I do it, the result is the same. One solution, although not ideal is to enable showing hidden files in Nautilus by pressing “Crtl + H” and  then deleting the ~/.dropbox folder. (or rm -rf .dropbox from a shell prompt) You will need to re-enter your account details. This sometimes causes two files by different date/times to be created in your Dropbox data folder as Dropbox is unsure as to which one is current. It is easier to avoid this problem by deleting everything in your ~/Dropbox data folder too. WARNING: IF YOU DO THIS, MAKE THAT YOU OR SOME OTHER SOFTWARE HAS NOT MODIFIED ANY DATA IN THAT FOLDER. This follows the assumption that, if you have just logged in to your system, (As that is when the error message pops up) then the copy on the Dropbox servers is current. Due to the above, I also strongly recommend that you do not  set any program to run automatically at log on (whose data you are syncing with Dropbox), as even if you did not modify any data in it, the date and time stamps will  change and cause Dropbox to resync those files or create duplicate files with different date/times which you will have to check manually and later delete one of them … unnecessary work!

The next time this happens, I’ll try to figure out the offending file so that we don’t have to delete the whole folder and loose all settings.

http://simplysimple.info/wp-content/plugins/sociofluid/images/digg_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/reddit_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/stumbleupon_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/delicious_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/blogmarks_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/newsvine_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/technorati_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/magnolia_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/google_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/myspace_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/facebook_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/yahoobuzz_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/mixx_48.png http://simplysimple.info/wp-content/plugins/sociofluid/images/twitter_48.png
2 Comments so far
  1. Emmanuel Smith April 29, 2010 3:41 am

    I have tried the fourth method with liferea however whenever I add new subscriptions, liferea deletes my shortcut and creates a new feeds file.

  2. Rufus May 1, 2010 11:49 am

    Hi Emmanuel. I am currently out of station on a long trip, will check out as soon as I get back. Sorry.

Comment on this post

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

IMPORTANT! To be able to proceed, you need to solve the following simple math (so we know that you are a human) :-)

What is 10 + 10 ?
Please leave these two fields as-is:

Spam protection by WP Captcha-Free

+(reset)-
Follow me
© 2009 Simplysimple.info webmaster simplysimple.info