Google Answers Logo
View Question
 
Q: Restore MySQL database from backup ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Restore MySQL database from backup
Category: Computers > Programming
Asked by: jhabley-ga
List Price: $100.00
Posted: 22 Sep 2003 13:34 PDT
Expires: 22 Oct 2003 13:34 PDT
Question ID: 259160
I lost the data in several tables of my MySQL database. I do have a
backup (three, actually... in SQL, TEX, and CSV formats) and I have
MyPHPAdmin on my server.  I need:

1. The data restored; and,
2. MailWorksPro 3.0.9 installed (I own, and can supply, the PHP
files).

Some of this will require some "offline" discussion, as I'm not keen
to post my server password data here. ;-)

Request for Question Clarification by legolas-ga on 22 Sep 2003 15:35 PDT
I'd be happy to give you directions on how to restore the data from
your backup using MyPHPAdmin.

Also, I can provide you the instructions on installing MailWorksPro
onto your server as well.

However, I can not do any 'offline' discussions as that is a violation
of the terms of service on Google Answers.

Please let me know if a step-by-step instruction/answer is ok?

Thanks,

Legolas-ga

Clarification of Question by jhabley-ga on 22 Sep 2003 16:36 PDT
Hi - thanks for your question.

My preference is that someone else does the actual work for me as I'm
not great on the unix side of things, but would be willing to have
someone walk me through the restoration of the data in the tables
through PHPMyAdmin.

However, the $100 price I had posted was there for someone to do this
work for me. I'd pay $15 for the general instructions, though. Would
you take that if I were to close this and repost?

Request for Question Clarification by joseleon-ga on 23 Sep 2003 01:07 PDT
Hello, jhabley:
  I'm able to restore your database and also setup your MailWorks pro
by the price of this question. As legolas say, we are not able to
perform an offline discussion, so to send me private data/files, you
can do the following:

-Create a text document with all the access data (host, user,
password) for SSH/ Telnet access, I need it to setup MailWorks

-Go here:
 http://www.xpde.com/upload.php

-Upload such text file

This file will be private and please, don't include any e-mail address
of you or any other means of contact. Also, if you have any
question/problem, post it here, this is the only way we can
communicate.

Please, tell me if this is what you are looking for.

Regards.

Clarification of Question by jhabley-ga on 23 Sep 2003 07:26 PDT
Hi there - just to confirm, the info I send you via that upload link
will NOT be posted here, is that right?

And also, I don't have Telnet access to my server, but I do have FTP
access and that's all that's needed to install MWP.

Could you clarify if that's okay and that the upload link you sent me
is just to you and not public?

Request for Question Clarification by joseleon-ga on 23 Sep 2003 08:34 PDT
Hello, jhabley:
  You are right, the information you sent using the upload link will
NOT be posted here, but please, don't include any contact information
as this will break the Google Answers Terms of Service.

If you have just FTP access is OK, but SSH/Telnet is easier for me to
modify any configuration files, that's all.

The file you upload will be stored on my server in a directory outside
the webserver and it can only accessed by me, don't worry.

If you send me the info, I can start tomorrow 9:00 GMT+1, please, post
here:
-Info about the database you want to recover and where to find the
backup SQL
-Also, include info about where you have uploaded MailWorksPro on your
server

That is, use the upload facility only for private data you want to
share with me, the rest must be posted here.

Regards.

Clarification of Question by jhabley-ga on 23 Sep 2003 08:50 PDT
Super, thanks very much. I'll prepare the text file, without my
contact info, and upload it now.

Request for Question Clarification by joseleon-ga on 24 Sep 2003 00:51 PDT
Hello, jhabley:
  I have installed MailWorks pro on your server and I have restored
your database, please, test if everything is in place and don't
hesitate to request for a clarification if you find any problem, I
won't answer the question until you are satisfied with the results.

Once you are satisfied I will delete some directories on your server,
because I have made some backups to prevent any possible problem.

In any case SSH access is enabled on your server, it has been really
useful to me ;-)

Move the transfer directory out of the web publish directory, because
the contents are public to anyone.

Regards.

Clarification of Question by jhabley-ga on 24 Sep 2003 07:41 PDT
Looks great, thank you so much! Feel free to answer it formally.

Clarification of Question by jhabley-ga on 24 Sep 2003 07:43 PDT
Sorry, I've just noticed one bug in the MWP install. When logging in
and clicking the Backup button, it generates a CGI error. Could you
fix that up?
Answer  
Subject: Re: Restore MySQL database from backup
Answered By: joseleon-ga on 24 Sep 2003 07:51 PDT
Rated:5 out of 5 stars
 
Hello, jhabley:

  Let this answer be the procedure I followed to perform the job you
requested without reveal any private information.

  I accessed your server using SSH to get a console to work on, I
dumped your current database using the mysqldump command:

  mysqldump -h yourhost -p yourpassword futurefi > backup.sql

  This way, if anything goes wrong I could return back to the previous
state. I also renamed your working MailWorksPro directories to prevent
any possible problems.

  I unzipped the version of MailWorkPro you told me to install and I
copied to the directories you need it. Then, I executed the
install.php process, I *chmodded* the necessary files and filled all
the fields in the installation wizard. I deleted the install.php and I
checked the administration and newsletter dir were working ok.

  After that I added your backup data to the working database using
the mysql command:

  mysql -h yourhost -p yourpassword futurefi < yourbackup.sql

  And I tested if the newsletter part was working ok.

  I would like to leave 1 or 2 days the backup files and directories
on your server to prevent any possible problem, once you are totally
sure things are working ok, just tell me to delete all not needed.

Regards and thanks!

Request for Answer Clarification by jhabley-ga on 24 Sep 2003 07:54 PDT
Super, thank you very much -- easy once you know how it works, eh? 

One last tweak... the "Backup" link inside the admin screens of MWP
generate a CGI error still.

Clarification of Answer by joseleon-ga on 24 Sep 2003 08:35 PDT
Hello, jhabley:

  This is a MailWorksPro bug, not an installation error, in any case
it's fixed now, let me explain. The file that generates the backup you
download to your computer it's called subscriber.php, this file
iterates through all the selected tables and creates the SQL needed to
recreate the database.

The problem is that your database it's really big when converted to
text (4964118 bytes) and even the PHP memory limit it's 8Mb, which is
enough, they use output buffering to force the browser download that
SQL file to your computer, which doubles the size needed to store the
string. Adding this line in that script fixes the problem:

  ini_set('memory_limit','16M');

I have test it and it works ok, please, continue testing and let me
know any other additional problems you have, don't hesitate to do it!
;-)

Regards.
jhabley-ga rated this answer:5 out of 5 stars
Joseleon was clear, direct, and fixed this problem for me.  A
life-saver! Thank you so much.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy