Migrating existing DB to new Mercury server.

Events happening in the community are now at Drupal community events on www.drupal.org.
WhenInRome's picture

So we've got our new mercury server all setup and we've been playing around with migrating our db over. We figured we couldn't just export the current DB and simply just move it over to the mercury server because mercury has it's own profile with it's own settings etc, but we tried anyways...and that didn't work obviously..site didn't load at all

So my next move is to export my current DB with all of the settings checked in phpmyadmin :

Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
Add IF NOT EXISTS
Add AUTO_INCREMENT value
Enclose table and field names with backquotes
Add CREATE PROCEDURE / FUNCTION

and then import it on top of a clean mercury DB that the profile script created. Is this the right move? Will the mercury settings be intact still or will everything just be hosed? Or Will I just lose the module settings and just have to enable varnish, solr, and config the settings on the performance page?

What's the correct play here?

Thanks,

Comments

I am also very curious about

j0k3z's picture

I am also very curious about moving an existing Drupal database to Mercury. I believe once its moved over you install pressflow on top of it?

Coming Soon

joshk's picture

We will have some "official" documentation on how to do this soon. Basically, if you have an existing site the process you take is to "mercury-ize" it:

1) Switch the drupal core to pressflow or put your existing contributed modules onto mercury (six of one, half dozen of the other)
2) Load your database over the default
3) Run update.php
4) Add the key contrib modules (e.g. memcache, varnish, apachesolr)
5) Implement configuration for those modules (including the settings.php for memcached)

This gets a bit more complex if you are using version control for your codebase (which you should be). We'll have step-by-step instructions soon, and eventually a "service" for this as part of the on-demand package.

Migrating existing DB to new Mercury server.

aussielunix's picture

Mercury is very nice. Thank you.

I have loosely followed the docs and now have a working pressflow(drupal)+memcached+varnish+php-apc setup running on CentOS.
CentOS5 is getting a little long in the tooth these days (CentOS6 will fix that) and is missing some modern packages so I have left Solr out for now. I do not have an immediate use for it anyways.

I am now wanting to migrate existing sites to this new platform.

We are using GIT to manage our sites and our workflow is like this:

cd /var/www
git clone gitosis@gitserver:drupal6.git drupal
cd drupal/sites
git clone gitosis@gitserver:example.com.git example.com
cd example.com
git submodule init
git submodule update

grab latest production backup of sites/example.com/files/ dir and sql dump  
import SQL
copy in files/ dir to /var/www/drupal/sites/example.com/
update settings.php
create vhost

Everything is kept in the domains site folder(sites/example.com) and nothing goes in sites/all or sites/default
I am not quite sure what is meant above by ''Load your database over the default''
I have looked around some and not able to find any documentation on this.

TIA
Mick

Regards
Mick Pollard

www.lunix.com.au

re: Migrating existing DB to new Mercury server.

Greg Coit's picture

I am not quite sure what is meant above by ''Load your database over the default''

This involves a couple steps. On the server you're migrating from:

mysqdump -u USERNAME -p DB_NAME > db_name.sql

send that to the server you are migrating to (using scp or ftp). Once there, you want to make sure the db you're importing to is empty (making a copy if it first just in case):

mysqdump -u USERNAME -p DB_NAME > old_db_name.sql
mysql -u USERNAME -p
> drop database DB_NAME;
> create database DB_NAME;
> quit

and now impport the database you copied over:

mysql -u USERNAME -p -D DB_NAME < db_name.sql

Hope this helps,

Greg

--
Greg Coit
Systems Administrator
http://www.chapterthree.com

Migrating existing DB to new Mercury server.

aussielunix's picture

Thanks Greg.

I actually spent some time on this last night and worked it out. I have made a post on my site about it.
http://www.lunix.com.au//tags/drupal/

cheers
Mick

Regards
Mick Pollard

www.lunix.com.au

Mercury

Group organizers

Group categories

Post Type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: