At Work, on The Road, at Home… Practical, Non-intrusive Solutions to Data Syncing

Data syncing has been a recurring problem for me for as long as I can remember. Reading and modifying documents at work, and then trying to access these documents at home can be a pain in the ass unless you get into the regular habit of copying these documents to your USB key, or to your laptop. When you are ready to work on these documents at home, you have copy these documents off your device, do your work, then save them documents back to the device so that you will have an updated copy when you go back to work.

Well, I’m lazy. I hate routine, and I hate having to “develop a habit”. Sometimes developing a habit or routine (daily, weekly, monthly) is necessary, but for some things, like document management, it shouldn’t be. The computer has the power to do the work for us, we just have to tell it how.  Luckily, my work computer is my laptop, so that eliminates one obstacle. At home, I have my workstation setup with a “mapped network drive” (windows) to a directory on my laptop (windows) where I keep my data. My laptop has built-in 802.11g wireless capability. At home, I have a Linksys Wireless-G AP.

So in order to access the documents on my laptop, I have to:

1: Turn the laptop on

And voila! I have access to my work documents via a share on my home workstation. But for me, thats not enough! I have few other problems, and possible solutions I will discuss in a response to this article

10 thoughts on “At Work, on The Road, at Home… Practical, Non-intrusive Solutions to Data Syncing”

  1. Well, I suppose Data syncing is a big deal for everyone. For me, it is
    such a problem because I consistantly work on 5 different computers at
    work and I don’t trust our NAS as it has crashes about once every six
    months. So, I keep all my work in shared folders and periodically backup
    as needed. I think the biggest problem is that no matter where the
    information I was is, I can always VPN to work and reshare the drive to
    whatever computer I’m on. The “script” for last weeks D&D session was left
    at work it only took a couple minutes to get it, but it shouldn’t have
    been necessary. Some kind of automatic syncing would be beneficial.

  2. Syncing Your Data:

    On windows, I’ve come across an application (unfortunately it’s
    commercial, and I haven’t found an open source equivalent) called
    “Total Commander” that makes syncing files and directories (under
    windows) fairly easy (but still not automated)

    I use Total Commander regularly (*cough*cracked*cough) when I need to
    do windows file/directory syncing.

    Now, Linux is a whole other ball game…

    I am currently in the process (almost done actually) of setting up a
    linux based file-server where I will house all my data (including the
    contents of my windows “My Documents” directory)

    I will enable samba on the fileserver, and map the linux drive to my
    windows workstation (at home). This will make all my data (linux and
    windows) accessible under a linux environment [*blushes*].

    Now, I can also map this linux/samba drive onto my laptop, or maybe
    share my data-directory on my laptop, so that my linux machine can
    access it through samba. [here’s where the party begins]

    1) Use my linux/samba drive as my “data” directory for my windows home
    machine

    2) Share my data-directory on my laptop so that my linux/samba server
    can access it over the wireless network when the laptop powers on.

    3) Use ‘rsync’ on the linux/samba system to sync over data from the
    laptop to the samba server [remember the home windows machine uses the
    linux/samba drive as a default data store, so it would have access to
    the sync’d data automatically].

    4) Have a script detect when your laptop is online (detect by pinging
    the IP if it’s static, detect by checking leases file for hostname if
    dynamic)

    5) When the script detects that your laptop is online, it synchronizes
    data to/from the laptop automatically.

    The first time you do this, it will take a while because you are
    copying all files from/to the laptop, but with ‘rsync’ subsequent syncs
    take little to no time at all, since it only transfers files that have
    been modified (have a newer modification date)

    So in essence, I come home, power on my laptop (don’t even have to plug
    it in) and while i’m grabbing something to eat, or putting my coat
    away, the data on my laptop is already sync’d with my server.

    All I have to do to access my laptop data is sit down at my workstation
    and start working on my documents!

  3. Yeah well, I still haven’t solved the “at work” component yet. For
    myself its easy because my laptop is my workstation. But in your
    situation where you have your data in shared folders, it might be a bit
    tricky.

  4. Can’t you rsync at work? At work, I have a linux workstation and a windows
    workstation. I have a windows workstation at home and (hopefully) will
    soon have my linux server up at home. Laptop goes back and forth between
    work, but not on a daily basis and I don’t want my sync solution to be
    dependant on the transfer of a laptop back and forth. It would be better
    to use a vpn tunnel between work and home and then sync. But then that
    process wouldn’t be automated. I’d have to fire up the vpn connection.
    This will take some thought before I move forward with anything.

    Derek

  5. The server is linux based, but the clients are windows. Unfortunately this
    is the only linux box I didn’t create at work. I’m sure I can convince my
    boss to have another set of vpn credentials set up for ‘linux testing’.
    That usually works. If not, coudn’t I then use the windows client, but use
    the linux box to sense the connection and then perform the syncing?

  6. Yep I suppose, if:

    1) the remote linux server has access to the source and destination
    directories/shares
    2) the linux box can detect the connection by a) pinging the client
    that has a static IP, or b) the server has access to the dhcp leases
    file (to check for active leases), and knows the hostname of the
    connecting client

    But all this would have to be done by your linux box at work.

  7. I would think that regardless of which (home) machine makes the
    connection, my work network will be visible through the vpn link. Polling
    is usually a poor solution as it unneccessarily uses up cpu cycles. What
    I would ‘like’ to do given the time is to investigate writing a device
    driver to do this. The device driver would use interrupts instead of
    polling and automate the syncing procedure. I have no idea how this would
    work and I may be doing way more work than necessary as modern CPU’s
    wouldn’t choke on a simple poll loop. That being said, I always like doing
    things the elegant way, regardless of the pain and torture it puts me
    through.

  8. >That being said, I always like doing things the elegant way,
    >regardless of the pain and torture it puts me through.

    Here Here!

Leave a Reply

Your email address will not be published. Required fields are marked *