A.K.A. Backing up all of your data, setting up email, and configuring DNS.
Seeing as my Media Temple install still wasn’t responding, the first thing I had to do was login to Plesk and see what services I could shut down to get on with the move. Turned out there actually wasn’t any, so I took the decision to shut down Apache for a few hours while I tried to get email sorted.
Hours were spent researching the best way to migrate the seven email addresses between servers, until a friend recommended Google Apps. The standard edition (free) gives you a calendar, docs, sites, and — most importantly — email. 7GB of data per user, with 50 users allowed per domain. There was also the added bonus that I would be moving reasonably intensive resources (spam filtering and such) off the server, and that if my server ever went down again email would not be effected. The only downside to Google Apps is that you can’t have multiple domains on the same account (unless you want all the email to go to the same address), so it required setting up 3 different accounts to manage all my email addresses. Setting up an account is relatively painless, involving creating a document in the root of your domain to prove your ownership.
The first thing to do was to upload all my emails. This required booting up Parallels Desktop into XP, as the Google Apps email uploader is Windows only. It was simple enough to create a new POP (important, as you need the email available on your machine) account for each user in Thunderbird and then upload them to the relevant Google Apps account. The only other important step is to modify the MX records for your domain, your hosting provider should provide some way in which to do this. You’ll want to delete your old MX record, and add the following:
1 ASPMX.L.GOOGLE.COM. 5 ALT1.ASPMX.L.GOOGLE.COM. 5 ALT2.ASPMX.L.GOOGLE.COM. 10 ASPMX2.GOOGLEMAIL.COM. 10 ASPMX3.GOOGLEMAIL.COM.
Give it a few hours to propagate and you’re good to go. The last thing to do is change the setting in your email client to reflect the fact that your email is now coming through via Google.
I could now go back into Plesk and turn my mail server off, and Apache back on. As I already had an FTP account set up for each domain, it was easy enough to FTP into them all and backup entire websites to my laptop. The only tricky part remaining was MySQL, and I didn’t know my admin account or password. Luckily cat /root/.mysql_history|more gave me the details I was looking for, and I could get to backing up my WordPress databases. Once again, a single line of code was all I needed:
mysqldump --opt --user=username --password=password dbname > output.sql
Where username was my username, password my password, dbname the name of the database I wished to back up, and output.sql the file created from the process. Once that was done I could copy output.sql to my laptop. Up next; getting Apache, MySQL, PHP, and Ruby on Rails to place nice on my new server.
The quality of the info is what keeps me on this site, thanks!
Greetings from Tim. :)
Tim.H on .