I need to move my drupal site to a new host because my old host does not support LDAP and I need that for my site. Anyway, I read in the handbook how to migrate the database but I'm afraid that the instructions weren't clear enough for me. I have never done this before. I was going to use the Backup and Migrate module .... Anyway my one question for now is, am i supposed to do a clean install of drupal first and then import the old database? Or do i need to put the old database into the new hosting environment first?
Sorry if this is a dumb question. I don't know much about this sort of thing (yet that is).
I'm actually really nervous about doing this.
Also, my new hosting at Media Temple has php safe mode on. Is this going to cause issues? should I turn safe mode off?
Thanks,
becky
Comments
Of course you need to upload
Of course you need to upload Drupal and all you modules, your theme and your uploaded files.
You don't need to install Drupal, because "installing" essentially means creating the database tables, and you already have yours in your backup. Just create a new utf8 database and a user with the needed privileges for it, and load your database backup.
The order of uploading the files and loading the database doesn't matter, because they are two separate procedures, until you bring them together by entering your database connection information in Drupal's settings.php file, in the
$db_url =line. Also, it never hurts to run update.php at the end, because (in Drupal 6) it does some cleanup.Although there are always little surprises in a new host, don't worry as long as you have a good database backup and your files, and people to ask questions.
PHP "safe mode" is always bad, so disable it if you can. It causes all kinds of problems with uploads. By the way, it has been removed from the upcoming PHP6 (see http://php.net/features.safe-mode)
one more thing
so when I want to connect my database and files, do i navigate to settings.php and fill in the required database info or do I just go into the file via text editor and change the line?
Thanks,
Becky
That file is not for running
That file is not for running it. It must be edited. You can check your old one and make the necessary changes for the new host.
Ok. I went to update my
Ok. I went to update my $db_url= line and nothing happened. I'm still getting a site offline message at my site.
I used my default hostname mysql.wimaxfourm.org but I'm not sure why it didn't work.
phpmyadmin is telling me myserver is localhost (i have a virtual server) (Localhost via UNIX socket). So I don't know what to put for my name.
[UPDATE]: it was localhost-- that was my hostname. How weird. I don't really understand why it would be localhost but it was.
> my old host does not
> my old host does not support LDAP and I need that for my site
May I ask what you're using LDAP for and what do you mean that your new host 'supports it'?
I'm doing a school site where students don't all have email addresses (and shouldn't have to supply one anyway). One of my biggest, most difficult problems to overcome before the site is able to go live is that drupal insists that every user has a unique email address. On top of that, all the drupal 'communication features' simply assume that the user has supplied a working email.
So I looked at LDAP as a potential solution (authenticating from a pre-created list of pupils and passwords), but concluded that webhosts simply don't support running LDAP servers. Which MediaTemple account-type supports it? Do you have to install your own LDAP server, or is there one already available?
Thanks.
> I'm actually really nervous about doing this.
Don't be. As long as you have the site remaining on the old space with the old database, then you can always get back to where you are now. You could literally do the migration wrongly ten times before getting it right - so you don't have to do it correctly the first time, and it's highly unlikely that you can do anything which breaks your new account beyond repair or a simple reset by the host.
Thanks for the encouragement
Thanks for the encouragement and help. As for LDAP, my old host just didn't have php configured right to install it on their servers. I guess I would have needed to compile the php for it and install it myself. If you get Media temple you need Dedicated Virtual Server. The MT people have a 24 hour hotline and I've called them twice so far and they seem helpful.
They just install it for you, too. You don't have to do anything.
Thanks,
Becky
Ok. something went wrong. It
Ok.
something went wrong. It imported the db into the new database but it only imported 26 out of 138! I don't know what to do or why this happened.
When I exported I selected all my tables, and picked the .sql format.
selected: Add DROP TABLE / VIEW / PROCEDURE / FUNCTION
Add IF NOT EXISTS
Add AUTO_INCREMENT value
nclose table and field names with backquotes
Data:
Complete inserts
Extended inserts
50000 <- max length of created query.
This stuff was selected by default when I went to the page.
Can anyone see what I did wrong?
becky
If it was a large sql file,
If it was a large sql file, it is possible that it timed out while uploading. Some things to try:
- Go back to your old database, empty ("truncate", not "drop") all cache_something tables, the sessions table, the search tables, and the watchdog table, to make the backup smaller.
- In the database export page, make sure that you have selected all the tables.
- In the database export page, select "gzipped" (near the bottom) to get a compressed database backup.
- In the new site, load the backup from the .gz file, as it is.
If this is not enough, you may need to separate your database backup in 2 or 3 chunks and import a few tables each time.
Importing my database in 2
Importing my database in 2 chunks is what I ended up doing. Thanks for the tips though. I will try doing that next time I need to move the database. The file,btw was 12.5 MB. Is that large for an sql file?
Becky
I guess it could be much
I guess it could be much larger. Eye of the beholder.