IT Tutorial

Move Your Windows Data to Ubuntu

Your files, bookmarks, and other settings are locked away in a Windows installation. Learn how to move them over to your new Ubuntu system.
So you're making the big move. You're ready to pack everything up and move from Windows to Ubuntu. The easy part is getting Ubuntu up and running. The trickier part is migrating all your data, which is spread out all over your Windows hard disk. Here's how to pack up all your stuff and make use of it on your new Ubuntu system.


Transfer Outlook into Thunderbird
Before you transfer your Outlook email into Thunderbird, first make sure that Outlook is set to be the default mail application (if you've been using it for your mail application, it probably is). Open the Control Panel and double-click on Internet Options. Go to the Programs tab and make sure that Microsoft Outlook (or Outlook Express, depending on which one you use) is specified as the email program, and then click OK.
Next, launch Mozilla Thunderbird. Select No when it asks whether you want to make Thunderbird your default email application. If this is the first time you've run it, it will prompt you to import your mail and settings.
If not, select Import from the Tools menu. Now you're ready to import your mail. When the Import dialog box appears, select Mail and click Next. Choose Outlook or Outlook Express and click Next. When it's done, click Finish. Your mail is now sitting in Thunderbird.
Transfer your Thunderbird mail to Ubuntu
If you transferred your mail from Outlook, it will be sitting in a Local Folder called Outlook Mail. You should have a few folders there, including Deleted Items, Drafts, Inbox, Outbox, and Sent Items. If you expected a whole bunch of mail to be imported from Outlook but found nothing, check to see whether you are using IMAP for your email (see the earlier note about transferring your IMAP account).
To grab the mail folders from Thunderbird, you'll need to locate your profile folder. First, shut down Thunderbird, and then open a Windows Command Prompt. Next, change to your Thunderbird directory with this command:
cd %APPDATA%\\Thunderbird

( APPDATA is a Windows environment variable that points to the currently logged-in user's Application Data directory.) You'll find a Profiles directory in there, and in that directory, there should be a directory with a funny name, such as pr4qpneu.default. This is your Thunderbird profile directory. In this directory, look for the subdirectory Mail\\Local Folders, and then look for your mail folders, which may be in yet another subdirectory.
For example, this directory contains some empty folders (such as Drafts, Sent, and Trash):


These folders use the Unix mbox format and can be imported into most Ubuntu email programs. For example, you can basically reverse the process to move the folder from Thunderbird on Windows to Thunderbird on Linux: find your Local Folders directory in your Ubuntu ~/.mozilla-thunderbird directory, make sure that Thunderbird is not running, and copy the files into that directory. When you restart Thunderbird, the folders you copied should appear in your list of Local Folders.
In Evolution, you can select File Import to bring up the Evolution Import Assistant. When prompted to choose the Importer Type, select Import a Single File and then specify the mbox file when prompted to choose a file. If you have trouble importing files into Evolution, you can copy them manually: exit out of Evolution, and copy the files to ~/.evolution/mail/local.
If you have any problems, check the MozillaZine article on importing and exporting mail at http://kb.mozillazine.org/Importing_and_exporting_your_mail. However, considering how complicated it is to move mail from one system to another, you should consider using IMAP, which eliminates all these steps the next time you need to move from one machine to another; with IMAP, all your mail and folders are stored on the server. Contact your system administrator, Internet Service Provider, or mail provider to find out whether they support IMAP.
Are You Bringing the Browser?
You'll be happy to hear that exporting and importing your browser settings will be simple compared to migrating email. If you're using Internet Explorer, you'll first need to export your cookies and bookmarks and then copy them over to your Ubuntu system. To export them, start Internet Explorer, and select File Import and Export. This starts the Import/Export Wizard. You'll have to run it twice: once for your cookies and once for your favorites (bookmarks).
If you're using Firefox on your old system, you can locate your profile folder and grab the bookmarks.html and cookies.txt files. To find your Firefox profile directory, open up a Windows Command Prompt and issue this command:
cd %APPDATA%\\Mozilla\\Firefox\\Profiles

As with Thunderbird, you'll find a strangely named directory, such as 9yk75acu.default. Your cookies and bookmarks will be sitting in this directory.
Once you've grabbed your cookies and bookmarks, you can use your browser's import function to bring them over to Ubuntu. For example, with Firefox, you can import bookmarks by selecting Bookmarks Manage Bookmarks, and then selecting File Import. To copy your cookies over, you'll first need to close Firefox, then paste the contents of the exported cookies into your existing cookies.txt file in your Firefox profile directory on your Ubuntu system, located in ~/.mozilla/firefox.

Your Stuff, Your Music
Unless you've decided to put your documents elsewhere, Windows makes moving them to Ubuntu quite easy. Windows uses the My Documents folder to organize your documentsincluding music, video, and othersand most applications respect this organization (for example, iTunes organizes its files under My Documents\\My Music\\iTunes). The actual location of the My Documents folder varies by Windows version. For example, on Windows XP, it is on the system drive (usually C:) in \\Documents and Settings\\My Documents.
Although it's easy to copy over the files, some files, such as multimedia files, will probably not play on Ubuntu without a little extra effort.
Your Little Black Book
To move your appointments and contacts over, it's best if you can get your data into the vCalendar or iCalendar format (for calendars) and the VCard format (for contacts). If you can do this, it will be simple to import into an application such as Evolution or Thunderbird.
Outlook will let you export items one at a time, but this is too tedious for importing many contacts or calendar items. The free OutPod (http://outpod.stoer.de/) is designed to export Outlook items to an iPod, but to accomplish this, it uses the vCalendar and iCalendar formats to store the data. To use it, simply run OutPod.exe and navigate to your list of calendar items or contacts (Outlook will probably ask for your permission to let OutPod access its data). Click in the list of contacts or calendars and press Ctrl-A to select all. Then click OutPod's Outlook menu and choose "Save Selected Items in One File."
Copy the .vcf (VCard), .ics (iCalendar), or .vcs (VCalendar) file over to your Ubuntu system, and import it into Evolution or Thunderbird (addresses only). For Evolution, choose File Import to bring up the Evolution Import Assistant, and choose to Import a Single File when prompted. Select the file you want to import (you may need to specify the file type), as shown in Figure 1-5, and then continue through the Import Assistant to import the data.
Figure 1-5. Importing an iCalendar file


Another utility you may find useful for exporting calendars from Outlook is the free Outlook to iCal Export Utility (http://outlook2ical.sourceforge.net).



Am I Forgetting Anything?
As a last check, open up your Windows Control Panel, go to Add/Remove Programs, and review the list of programs. Do you see any that store their data in a nonstandard location? For example, anything with a keychain, such as GNU Privacy Guard or the PuTTY SSH suite, might be keeping some keys you can't live without.
GNU Privacy Guard keeps its files in the gnupg subdirectory of the user's Application Data folder. APPDATA is an environment variable that expands to the user's Application Data directory, so issuing the command:
dir %APPDATA%

in a Windows Command Prompt will reveal gnupg's location. PuTTY keeps its keys wherever you decided to put them. If you've been using Pageant, select Add Key, and it should pop up with an Open File dialog set to the most recent directory you used.
If you're a Cygwin (http://www.cygwin.com) fan, don't forget that it keeps its home directories in a separate location (usually C:\\cygwin\\home). You may have all kinds of important documents and dotfiles kicking around there!
You Could Just Hire a Mover
There are a few third-party applications available to help move from Windows to Linux, but not all of them support Ubuntu. If you have a lot of machines to migrate, you might want to check out one of these:
• Desktop Migration Agent (http://www.alacos.com/linux.html)
• Progression Desktop (http://www.versora.com/)
• MoveOver (http://www.resolvo.com/products/moveover/index.htm)
• LSP (http://www.das.com.tw/elsp.htm)
Brian Jepson




Move Your Windows Data to Ubuntu