The problem :

The problem is famous : how to keep multiple computers in sync in order to have access to our data no matter where we are, no matter which computer we are using. It isn’t the first time I wonder about how to improve this aspect of my computer setup and I must say that Dropbox, Evernote, Google Calendar, GMail and a lot of other “cloud” solutions as they are called have helped tremendously over the years. Still, this week iMac incident once again brought the problem to the surface.

A little background :

My primary computer is an iMac based at home. I work as a software engineer so I also have a work computer. At the moment, this is a brand new MacBookPro. I also own a three year old MacBook which I use when we are away from home (unload photos, check emails, simple things like that).

When my iMac broke down earlier this week, I wasn’t without a computer. I had two more. Still, I felt left out because my various emails accounts were not setup on either MacBooks (my work computer doesn’t carry any of my personal data), my iCal wasn’t setup on any of these machines to track my appointments. My on-going projects on the iMac (personal development, Lightroom work, etc) was also stuck on the iMac’s hard drive.

A possible solution, making my Mac User portable :

The problem is known and a lot of people have solved it many different ways.

Apple tries to answer it with MobileMe, Microsoft created LiveMesh, etc. The problem is different for each of us as we all have a different setup. Some might decide to simply sync (using rsync for example) two computers to be exact replicas of each others. With today’s bandwidth, this is a solution just as valid as any other.Of course, the problem also depends on your setup : do you have several personal computers ? Do they all run the same OS ? Are they on the same network, etc ?

My situation has the following characteristics

  • I am the only person using these three computers (boyfriend is allergic to Mac somehow, he might launch Opera to check his emails on the MacBook when we’re away from home but that is an effort for him)
  • All three machines are running Mac OS X Snow Leopard
  • I usually do not use two of these computers at the same time. I work on the MacBook Pro in the daytime, turn it down in the evening and use iMac for personal stuff. If we’re going away, I’ll update the MacBook (load music and stuff on it) and pack it while I’ll switch off the iMac.

Because of my situation, it seems to me that I can carry my Mac User around without taking too much risks in terms of file conflicts.

Testing

While I had my iMac repaired, I went and shopped for a 1TB 2.5 external hard drive. I ended up with a Western Digital Element SE (80 euros).

Here’s the idea :

Using Carbon Copy Cloner, I will periodically sync my iMac’s Home Folder on the Western Digital Element. That simply means that my main Mac user will be available on this external drive with all my personal data (Music, Photos) and profile (Mail.app configuration, iCal configuration, etc).

On the MacBookPro, I renamed my user from samo (which I had used across all computers) to samowork. Then, I created another user called samo whose Home Folder is the Western Digital Element. I logged in with that user, fired Mail. It works, all my personal emails were there and the work emails were left out. So, from now on, if my iMac gets sick again, I can use another computer as a temporary replacement. Better yet, that will not leave any trace on that other computer (it’s all kept on the external drive).

On the MacBook, same procedure. I renamed my user to samobook and created another samo user whose Home Folder is the Western Digital. Now, when we are on the move, I don’t only have a Mac with me (which is cool) but I have MY Mac with all my stuff and that’s WAY COOL.

Also, the Western Digital Element also acts as an extra backup of my personal data (in addition to the Time Machine backup I make weekly)

I just completed this setup (doing a manual copy for now, not a CCC backup) of my Home folder and didn’t encounter a problem yet.

What’s left to do ?

  • Automating the sync (with CCC) or rsync and a cron
  • Making sure that, when running my profile on a different computer, I can sync my iPhone and not loose my media or apps (see also my article about having 1 phone and multiple macs)

Going all the way ?

I suppose, to go all the way, I should use the Western Digital drive as my Home Folder on the iMac as well. No need to sync anymore but that would mean always having that drive hooked up and not using it as a backup anymore. Also, if there is ever a conflict somewhere, I’d rather just be able to consider the iMac the master Home folder and the rest as a slave. For now, I’ll experiment that way.

What you need to know :

  • If you wish to use your main account on the other computers (in my case, on the laptops), I would recommend pluging the external drive BEFORE logging in your account. I do not know what would happen if I was to login and my Home Folder wasn’t found.
  • You SHOULD only use your main account on what computer at a time. If I am using my account on a MacBook, I’d better sync the WD back with the iMac before using my iMac (to avoid conflicts between files)
  • Changing account’s shortnames and home folder is possible (and seems to be very well handled by OS X). Still there are dangerous operations. Check out the following pages of the Apple support site before proceeding
    How to change the shortname or home folder name
    How to move the home folder
  • This setup doesn’t not synchronize the installed Applications. Now I can see my photos on the work MacBookPro but I would need to install my Lightroom there to work on them (which I probably won’t do) but I could easily edit a personal project on my work computer since Textmate is installed across all my machines (and setup exactly the same way every where thanks to DropBox)

Anyway, I thought the idea was worth sharing as it might really answer the problem for me for now (still wondering how MobileMe will evolve).

Procedure :

Source machine :

Here is how to setup the backup from the imac’s home folder to the WD external drive using CCC (Carbon Copy Cloner)

  1. Download and install Carbon Copy Cloner, launch the software
  2. On the left, select your Macintosh HD and browse to Users > <yourUser> (ie samo)
  3. On the right, select your external hard drive (I formatted the volume and named it samo)
  4. Click on Save Task button
  5. In the following screen, name your task and schedule it
  6. To run and test it immediately, press Run
  7. This will take a while…
  8. Check the content of your external hard drive, you should find all the files you have in your Home Folder
  9. Note that, next time, the backup will take a lot less time as only modified/added files will be transfered (CCC uses rsync which backups incrementally)

Some my prefer to use rsync manually and be more in control of their backup.

Here’s a working code sample to get your started :

Sync the whole samo Home Folder (dry-run mode + verbose move, will only list what rsync would have done)

1
rsync -r -v --dry-run   /Users/samo/ /Volumes/samo/

Actually launch the command

1
rsync -r   /Users/samo/ /Volumes/samo/

Delete the files that are on the external HD if there aren’t on the source computer anymore

1
rsync -r --delete   /Users/samo/ /Volumes/samo/

Do not delete the files on the external HD, do not touch the ones that were modified on the external HD

1
rsync -r -u   /Users/samo/ /Volumes/samo/

A lot more options and information about using rsync can be found in posts such as 15 rsync command examples.

Target machines :

Here is the procedure I followed on the two laptops to move my current user “samo” and create the main one (with its exterrnal data).

  1. Go to System Preferences and go to the Accounts section
  2. Create a new administrator user (ie login admin, password admin). We will delete it when we’re done, it’s just a user I create in case something goes wrong I can always log back with him as Administrator and solve the problem
  3. OPTIONAL: if you already have an user on this computer named like your main user, you need to edit its name and Home Folder name…
    Launch Terminal.
    Navigate to /Users (cd /Users)
    Rename your user’s Home Folder (ie mv samo samobook)
    Back in the Accounts management, click on the lock to allow changes (if necessary)
    Right click on your user’s name in the list on the left and enter the Advanced Options
    Change your user’s shortname (ie from samo to samobook)
    Change your user’s home directory (ie from /Users/samo to /Users/samobook)
    Restart or Logout and Log back in to make sure your user still works…
  4. Return to the System Preferences > Accounts section and create yet a new user. Enter the account name of your main user (ie samo)
  5. Right click this new user in the list on the left, edit the home directory and select the Home Folder you copied on an external drive
  6. At this point, you can delete the temporary admin user (created at step 2), then logout and back in as your main user to see if everything worked for you

Last but not Least

Once your Mac user is following you everywhere, you can sync your iPhone/iPad (including the media ie apps, music, etc) from any of your computers without loosing data on your device.
Note: you still need to authorize each of the computers you use for purchased items so this trick won’t enable you to bypass the 5 computer limitation.

 

I hope this setup will work for me and hopefully help other multi-mac users out there…

Filed under: Computing, Mac OS X, Me myself I, Système

Tagged with: , , , , , , , , , , , , , ,

Liked this page?

Tweet it

Subscribe to the RSS feed or sign up for the newsletter now.

Posts related to A Single User Across Multiple Computers

1 Comment to "A Single User Across Multiple Computers"

  1. Trackback on Move your mySQL data on OS X World Gone Web : World Gone Web on July 28, 2011 at 8:41 am

    […] A Single User Across Multiple Computers […]

Name (required)

Email (required)

Website

Leave a Reply

  • About Me


    photo of Samantha Halfon Samantha Halfon
    Software Engineer
    blueKiwi software
    Paris, France
    I enjoy playing with my computer(s), listening to Bob Dylan (and related artists) and watching movies (especially if they were directed by Martin Scorsese or John Cassavetes). Sometimes, I play a little guitar... If not doing any of the above, I am either riding a small red bike around Paris, or, making videos. About my videomaking please check out World Wide Angle and its blog.