Jan 082010

cornerjunk

After getting my new server up and running, and setting up new email accounts, I realized all my old emails where still on the old server. So on the chance someone might run into a similar situation decided to write up the recipe I used to transfer old emails.

Assumptions:

1) You’re using an imap mailserver (if you’re not you really should), i.e. all your emails are stored in ~/Maildir on the server, not in a pop file on your local machine.
2) You have network accessible samba shares on both old and new server, and they’re both connected to the same network and accessible from a network client.

Procedure for transferring emails between servers:

1) Log on to old server (console, telnet, or ssh) and go into your old home directory
2) Compress mail directory into a single file with ‘tar cvf Maildir.tgz Maildir’
3) Copy the tar file to a samba share on old server ‘cp Maildir.tgz /(samba share path)’
4) Copy tar file from old server samba share to new server samba share. I used windows explorer which had both the old server samba share and the new server samba share mapped. The file was about 600 meg.
5) Create a temporary user on new server, like oldjohn (john being the current user on new server and the original user on old server), with a full account (mail, home directory, etc). Webmin works great for doing that.
6) Log on to the new server, and copy the Maildir.tgz file from the samba share to oldjohn’s home directory
7) Go into oldjohn’s home directory and extract directories and files with ‘tar -xvf Maildir.tgz’
8) Important step here. Make sure you change ownership of extracted Maildir and contents to oldjohn (you were john on old server, so extracted files are still owned by john, not oldjohn) with ‘chown chgrp -R oldjohn Maildir’ .
9) On your desktop machine which you use to get your emails, which presumably has your current email account, set up a new account on the new server for user oldjohn . My favorite email client is Thunderbird.
10) Connect to your oldjohn email account and voila, there they are. If you want to you can drag and drop your oldjohn emails and folders to your john account. To avoid inbox confusion, I created an ‘Oldinbox’ folder and dropped all the inbox emails in oldjohn’s inbox into it, then moved the Oldinbox over to john’s account. Also moved all the folders from oldjohn to john. Final step delete oldjohn’s email account from your mail client.

This HDR image was taken a while back at an abandoned factory. I do believe the device behind the blue box with some type of logo on it is a dynamometer, used for testing engines. Looks like a few hundred horsepower capacity.

2 Responses to “Factory Corner”

  1. Rob says:

    er, huh? I have much to learn about servers; I just manually backed up my blog…at least I think I did. I remember that place well with sensory overload. Nice new look to your blog.

  2. Wow! I love this one!

Leave a Reply

Anti-Spam Protection by WP-SpamFree