备份

This is how I uploaded my email in Outlook to Gmail.

The OS used for demonstration in following tutorial is Windows 7.

In general, there are two steps:
1. Convert email to mbox format.
2. Use “IMAP Upload” python tool to upload local mbox files to IMAP4 server (Gmail in this case).

##########################################
# 1. Convert Outlook Email to mbox files with
# Mozilla Thunderbird
##########################################

Download Mozilla Thunderbird from its official website http://www.mozillamessaging.com/en-US/thunderbird/ and install it. The version of Thunderbird used in this tutorial is Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2.

Choose menu “Tools>Import” and use the “import” tool to import email from Outlook. Upon prompt “Import Everything or select the type of material to import:”, I chose “Mail”, since I was only interested in email. Once the importing finishes, you can see a “Outlook Import” folder under “Local Folders” in Thunderbird.

The imported email from Outlook is stored in mbox formatted files, in directory
C:\Users\\AppData\Roaming\Thunderbird\Profiles\.default\Mail\Local Folders\Outlook Import.sbd\Mailbox – XXXXXXX.sbd.
Under this directory, files of interests are
* Inbox
* Sent Items
and so on.

Copy this files to a separate directory , and rename them to .backup.mbox.

##########################################
# 2. Upload mbox Files to Gmail with “IMAP
# Upload”
##########################################

Download “IMAP Upload” from http://imap-upload.sourceforge.net/ and read the instructions. The version of “IMAP Upload” used for demonstration is v1.2, which requires Python 2.5 or later to run.
Unzip “IMAP Upload” to any directory, which we call in the text that follows. Move as a subdirectory of . CD into .
Execute the following commands to upload the mbox files to Gmail. Note that you need to ensure the existence of the corresponding labels (e.g. “Sent Items”) in Gmail before the commands can return correctly; create corresponding “labels” in Gmail if they do not exist.

python imap_upload.py –gmail –box “Inbox” –error Inbox.err “./Inbox.backup..mbox”
python imap_upload.py –gmail –box “Sent Items” –error Sent.err “./Sent Items.backup..mbox”

If there are other mbox files you are interested in, perform similar steps for them. Upon the prompt for user name and password, enter your Gmail credentials, with “@gmail.com” omitted from user name.

Perform backup on updated mbox files from time to time. “IMAP Upload” will take care of the duplicated email and will not upload duplicated items.

Advertisements

One Comment on “备份”

  1. NE says:

    @!#¥%……&*&……%¥@……&*(……()(#?!#!?!><%$@":!$}{!%…WTH!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s