Trying to migrate a development site to a live site

I'm trying to move my development site to a live site and am following Nicole Bluto's Drupal LA seminar notes on "Migrating a Site from Stage to Live".

I've exported my databased using the Backup and Migrate module.
I created a fresh drupal install on the live site.
I've copied my "sites" folder from the development site into the live site.

At this point she says to create a new database... can I not just import my exported database into the fresh install?

Also, she says to alter the settings.php file at line #92

$db_url='mysql://username:password@localhost/databasename';

I replaced the 'username' and 'databasename' that is there with the right information, but have no clue what the new "password" should be. I have no idea how the password that is currently there was derived.

Any help would be greatly appreciated. Thank you.
Joe

Login to post comments

you'll need to create the database

rainbreaw's picture
rainbreaw - Mon, 2009-11-02 16:26

Hi Joe -

You'll need to create your database in the live environment, which is when you'll set the password. Once you create the new database, you can then Import (hopefully you have access to phpMyAdmin or somethink like it) the data from your stage site into your live database.

The slides that Nicole and I put together for the presentation actually walk through setting up your database on live. You can download them from this page:

http://www.sunrainproductions.com/drupalcampla/site-migration-basics

Scroll to the bottom and click on the attachments for the Slideshow and the Outline.

Hopefully that will get you through this step.

  • Rain

finally got it

Signal - Mon, 2009-11-02 16:56

Thank you for your reply.

The outline is very good, after about 5 attempts I finally got it right. I didn't take a look at the slides that might have saved me a ton of anxiety : )

Part of my problem was with my lack of familiarity with my hosting's phpadmin. Once I figured out how the database, username and password were listed in the phpadmin and correctly put that information in the settings.php file, it worked!

Thank you for your response.
Joe


glad you got it!

rainbreaw's picture
rainbreaw - Mon, 2009-11-02 17:34

Migrating a site is one of those things that is unnecessarily stressful the first time, and then very easy after you get used to it. One day very soon you'll forget your anxiety! :) I'm glad you got it working. Congrats on launching your site.


Hello, Signal, for the

wabowabo - Mon, 2009-11-02 16:33

Hello,

Signal, for the password you should write the database access password which is used by db user (username). This is either setup with your hosting account, or if you have created a new db with new user, then you should have also created a password for that user.

Also, make sure to check your mysql host information. On some hostings it is localhost, in some cases (like with Dreamhost, that i am using) it is mysql.mydomainname.com. Other hosting companies might have their own mysql servers; usually it is something like mysql461.yourhostingcompany.com.

Hope this helps.

Regards.
WaboWabo


Hello, Signal, for the

wabowabo - Mon, 2009-11-02 16:35

sorry duplicated entry. removed


When I transfer from a

GraMur - Mon, 2009-11-02 16:35

When I transfer from a development site to a live production site I tend to use the Backup & Migrate module. I would just do a fresh installation on the live site, transfer all the necessary modules and themes and use the backup and migrate tool to transfer over the database, it does the trick for me, the only thing is if you have images you need to copy those over onto the live site.

There may be other methods but this method works for me. I suggest you give it a try.


Thank you

Signal - Mon, 2009-11-02 17:03

Thanks wabowabo and gramur for your replies. As I mentioned above, my problem was my lack of familiarity with my host's phpadmin and being new to the Backup & Migrate module, I was a bit anxious. Everything worked (with a little hiccup), but better than could be expected.

Thanks,
Joe


backup & migrate module size limit?

Slurpee's picture
Slurpee - Tue, 2009-11-03 09:20

Anyone else notice the backup and migrate module doesn't work with databases that are too big?

I haven't done too much research. I tried exporting a 500 megabyte mysql file and it always timed out. I had to use the mysql command line to migrate.


host timeout settings

rainbreaw's picture
rainbreaw - Tue, 2009-11-03 15:06

This could be a function of your host timeout settings or your max_execution_time as well. This node: http://drupal.org/node/285337 or some like it might help. I haven't dealt with a database that large, however, so I'm not sure if this will be of any help.


max_execution_time will be a

djudd's picture
djudd - Wed, 2009-11-18 15:24

max_execution_time will be a factor in the backup completing, but another factor could be the tables you're backing up.

I really recommend that you don't back up your cache tables or session tables. They can be huge, and the backup module can choke on them.

Also, as an aside note, if you are using the Search module on a site with a lot of nodes, that can really make your database huge as well, and give you issues with doing a backup through the module. I am no longer using the search module (I replaced it with a custom search in views which keeps CPU load down), but when I did use it, I had to exclude all the search tables in my backup as well.

Realistically, I found it was far better to rebuild my entire search index than to try and explain to my boss why an import of our backup was going to take 8 hours anyway. Publishers don't often like the idea of a site being down for 30 seconds, let alone all day while the search index table imports.

--Putting a sign in front of a building full of lawyers, judges, and cops which says "Thou shalt not steal" creates a hostile work environment.--