Restore MySQL Database from ibdata and .frm Files with local and remote help


I updated a drupal 7 install without much thought, and I didn’t have a backup. Arg!!! Why would I do that? So it messed the datatables up royally, and I thought no worries, I am backed up with my server restore feature. But for some reason R1 backup was not working properly to restore, try as I might I kept coming to the same error.

AGENT: !InnoDB table Restore failed, mysql exited with error.

What does it mean, well, I am not exactly sure, but the data wasn’t restored. I started to work on the the server and then I remembered that working on a live server isn’t always the best idea. I found the backup restore files that R1Soft had sent back to the server in /var/cache/buagent

I downloaded the whole folder, and was determined to figure out how to restore it locally first. I found an answer here.

I am using Navicat, and MAMP PRO on a mac.

I created a new database in Navicat with the exact name of the server database. I went into the MAMP folder for database storage which is: /Library/Application Support/appsolute/MAMP PRO/db/mysql/… If you can’t see it on your root of your mac, go into the root folder and then select Go to Folder from the Go menu and type in library. Voila you are in the root library folder.

I copied the .frm files into the directory of the new database. I renamed the ibdata1 to ibdata1-old and overwrote the ibdata1 with the server backup copy.

After starting up mysql in Mamp Pro, all of the tables were restored to their previous state. I could then take this copy and send it up to the server to restore it.

To clean up the files, I used Navicat to dump the new database file to an SQL file, I removed the copyied ibdata1 file and restored the one that was there originally. Then I restarted Mysql, and then executed the dump file from earlier. This brought all of the tables and data back into mysql.

The most important step is to simply copy the contents of the /data folder and the ibdata1 file. Hope this helps!

It was a bit of an ordeal, and I hope to have the database restore feature working perfectly again before I need to do all of that again.
Lesson learned: Make a backup before major changes, and test before working on a live site.

Update: It turns out it was a bug int he r1Soft resotre functionality. Hurray it wasn’t my fault, but it took r1Soft and over a week to conclude the bug was there.

A Pica and Point Ruler


Occasionally, I have clients ask me to recreate a poster that they have from long, long ago. They want the fonts the same, photos etc. I have had posters, postcards, and business cards given to me. How do I know what size their fonts are. Well, I could go into math and create complex measurements after scanning at 100% and then measuring.

Or I could just use a ruler. Tiny Tutorials put together a great printable ruler for download. It’s awesome, and if you really want to do some folding you can make it into a 6 sided ruler. Awesome. Thank you to Tiny Tutorials.picture-1

How to Set Up a Blog

Blogging is a fun and creative way to express your thoughts on a given topic. There are lots of howtos on the web about writing a blog but I thought that I would offer a couple of tips to help you out.

  1. Commit. Blogging doesn’t take a lot of time, but it does take a bit of commitment. If you have gone toa blog that the latest post is in 2009, it doesn’t really help in your interest. You don’t have to hit in everyday to start but once a week is a good beginning. Espeicially for business, if you have a blog link on your main navigation and it leads to one post … “Hello World”, that doesn’t look great, take it down, commit or don’t.
  2. You can easily set up a blog on our servers through fantastico, or one of the automated scripts in the Cpanel (Control Panel). This gives you the custom URL you may be looking for.
  3. Set it up two ways:
    1. You can do it your self like the above and pull in a free template (Use wordpress it is highly customizable and pretty easy to set up).
    2. Hire a professional designer to set up your blog template for you. (Like me).
  • A 20 Minute Video Tutorial: This tutorial by Michael Hyatt is awesome, comprehensive, and easy to understand.
  • This 29 Part (short!) Video Series: Amy of Blogging with Amy does a great job here of breaking up a longer process (even if it is only 20 minutes!) into smaller chunks, so that if you don’t need all the steps, you can skip that video.
  • This site offers great ideas on what to discuss, how to do it properly. Their ebook is a good read for setting out too.

Why You Should Get Your Own Domain Name

I have been saying that getting your own domain name is a must for a long time, but many people still ask that question, so let’s talk about it once again. More specifically, let’s list the three main reasons why having and hosting your own domain is important.

  1. You have greater control over your material.
    When you have content, including cloud content it may or may not be ‘yours’. Have you stopped to read the TOS (Terms of Service) agreements of your provider? Sometimes they sneak that little bit in there, that they have the rights, retain the rights, or just at any time can take your rights to your content from you.
  2. Having your own domain gives you credibility.
    Since Blogger is a free platform, you’ll find all sorts of blogs there. Sure, there are some good ones, but the majority is low quality, and you’ll have a lot of spam blogs that are created just to manipulate search engines, too.

    As a result most people get suspicious as soon as they see the .blogspot on your domain name. That is why having your own domain will give an immediate dose of credibility to your site.

  3. Hosting your own domain gives you more flexibility.
    When you host your own domain name you’ll have complete control regarding the software and the setup that will be used there. You’ll be able to use simple HTML pages, to load a CMS like WordPress, to add special scripts and so on.

    As your blog grows you’ll find that this flexibility is vital, as it allows you to expand the scope of your site and generate more traffic and money.

Would you add any other reason as to why getting your own domain is vital?