I have created a drupal 4.7 site (with civicrm).

I it loaded in a public_html area and all seems to be fine.

I have create another user on the same host (ubuntu linux). I have created a new database for the new site. I tar up the public_html directory for the working site and move it over to the the new users public_html directory. Then I do a mysql backup of the working site.

Run:

 mysql -h localhost -pthePW newdatabasename <....path_to_backup_database_script_file

The database in now loaded with the table from my working site.

Edit
the settings.php file to update the $db_url value.

Seems like things should now be ready to run. But:

http://thesite/~newsite

Returns.

Page Not Found.

Nothing else on the page.

If I move:

public_html/sites/default/settings.php to public_html/sites/default/settings.php.old

the brower now complains about not being able to open the settings.php file. So the problem is somewhere down stream.

There is obviously something wrong with my approach of being able to move data around like this. Does anyone have a suggestion as to what the problem could be.

[edit -sepeck: added <code> tags]

Comments

cog.rusty’s picture

Can you explain slower
- What was that mysql command supposed to do?

I am not so familiar with mysql's command line to understand it but I (or someone) might get an idea about what is missing.

Also
- Is the command exactly as it appears on this page, or is there a missing < or something.
- Where did "Page Not Found." appear? In your Linux console?
- Does '/thesite' contain a working drupal installation and '/thesite/~newsite' the new drupal installation?
- Does ~newsite have a sites/default subdirectory of its own, with another settings.php file?

lhedrick’s picture

Sorry for the confusion. There is an error in the next line which is from my first post

mysql -h localhost -pthePW newdatabasename http://thesite/~newsite

it should have been

mysql -h localhost -pthePW newdatabasename <backup_file_name

before doing this I created the new database and granted the rights needed to load the tables

backup_file_name is the name of the output file created by the mysqldump command from the working system. The file contains a set of SQL commands which can be feed into the mysql command line process to build a new database. After the command is complete the new database will contain all tables and data as the original. The restore has worked. The newdatabase is now loaded and is named "newdatabasename" in the above example.

I now have a new loaded database. Next I copy all the drupal files to my new public_html directory. I move everything including the sites/defaults/settings.php file. I now have a new user on the linux system, a new user in the mysql and a new database. I adjust the settings.php file to contain the name of my new database and the new username and password. For kicks, if I edit the $db_url value and replace my new database name with junk and then try to access the new site with:

http://myhost/~the_new_user/index.php

I will get a page which says drupal can't open the new database. If I now fix the settings.php file again with the correct database name and try again. I now see a page which says

Page Not Found

My system now has two sites.

from my client browser
http://myhost/~the_original_site/index.php (this works fine)
and
http://myhost/~the_new_user/index.php (the new site shows "Page Not Found")

the new site is a copy of the first which I can use for testing. That was the plan anyway.

The fact that the code will open the database when the settings.php file contains the correct database name means that I am part way there. There must be something else wrong, permissions possibly. If I new what "Page Not Found" indicated I would have a clue.

Thanks for taking the time to ask for more info.

Larry

cog.rusty’s picture

In the meanwhile sepeck fixed your tags in the first one, so that one makes sense too now. And you have the two sites in same level directories, not nested, so normally everything should be simple...

More questions
- Does each site have its own public_html, or are they in subdirectories of the same one?
- Who says "page not found"? Drupal, the web server, or your browser?
- Has Drupal's .htaccess been copied ok? Because a bulk file copy command leaves it behind and sometimes people forget it. Also, does it contain any changes specific to the first site?

----

Edit: Scrap the second question. Obviously it was Drupal.
Scrap the first one too. You already said they have their own web doc root in your initial post.

Edit 2: Also truncate the 'cache' table in the new site's database.

lhedrick’s picture

Truncated the cache table. Still see page not found on the browser.

Not sure what to think. I was hoping to be able to restore this way. Don't know what is happening but, I need to figure something out. If my system goes down I want the ability to restore the database and the drupal code and come backup. I need an off-site backup system.

I also want the ability to duplicate sites for testing.

Anyone have any thoughts.

cog.rusty’s picture

Did the original site's .htaccess file contain a RewriteBase /~the_original_site line?

Does anything change if you disable Clean URLs in the second site? (http://drupal.org/node/5590)

drupal777’s picture

Larry, did you get this issue resolved? I was watching the support mailing list and I didn't see that you resolved it. If you did, I'd be interested in knowing what the issue was.

mosa’s picture

hey all,

well, it's been a while since this thread's been active, but I am hoping that someone might know how this is fixed? I am experiencing the exact same problem, and I tried all the suggestions here to no avail.

Hope someone sees this and knows what the solution was!
Thanks