I am moving a site to a different server. I am able to backup the database using the backup & migrate module, and also backup the files using the command:-
tar -cjvf BACKUP_file.tar.bz2 ./public_html
However, I can;t find any instructions how to carry out the restore on a different server.
I have tried restoring the files 1st using
tar -xjf BACKUP_file.tar.bz2
Then what? I also tried it the other way, creating a default install of Drupal with a view to restoring the database, but then somthing goes wrong that way...
Can someone kindly take pitty and point me to a tutorial to restore the whole site on another server please? Everything I have read so far only goes as far as carrying out a backup, but not the restore half.
Tuyre
Comments
Comment #1
alanburke commentedNext Steps.
Assuming you have created a database on the new server,
Use Phpmyadmin or other utility to import your database dump into your new database.
Then edit settings.php to point to your new database.
That should be about it.
Comment #2
tuyre commentedhello alanburke
I have tried your suggestion. I created a new database on the new domain.
I imported the back-up database, and phpmyadmin gave this confirmation:
Import has been successfully finished, 887 queries executed.I then entered the new domain in a broswer and got this error:-
The mysql error was: Access denied for user 'site_drpl1'@'localhost' (using password: YES).I think maybe the password of the original database must differ from the new one?
In the settings.php file I had changed this line:
$db_url = 'mysql://site_drpl1:xxxxxxxxxxxx@localhost/site_drpl1';I ensured that when creating the new database, I used the same as the xxxxxxxxxx found on the above line. Maybe I am doing this bit wrong I think. Since my original Drupal site was automatically created using fantastico deluxe on 'cpanel', I had no say on the original password, and it appears to be a hash or encrypted password... so is just using this password for the newly created database a case of copying it from the above line, or where am I going wrong? This is where a lack of instructions is puzzling me. I need something more specific please?
Thanks
Tuyre
Comment #3
tuyre commentedHello again...
I have just soved it. Although I had created the new database and a user for the new database using cpanel, I had not in fact added the user to the database, so the two were not linked.
I've done that now, and managed to get the site working on a second domain... so all is OK now.
Thanks very much alanburke for your suggestion. I am learning something great!
Tuyre
Comment #4
tuyre commentedComment #5
tuyre commentedComment #6
tuyre commentedComment #7
alanburke commentedhi tuyre
Glad to see it sorted.
When an issue is solved - the status should be set to 'fixed'.
It will be automatically closed in 2 weeks time.
This allows other people to see issues that have been recently fixed in the issue queue, before then are then closed off.
Regards
Alan