Author Topic: Trouble Restoring Database  (Read 6127 times)

Chuckman

  • Posts: 8
    • View Profile
Trouble Restoring Database
« on: August 09, 2009, 01:06:12 pm »
I'm trying to transfer my listmail installation to a new server.  I backed up the original database and uploaded the gz backup file to the listmail folder on the new server in ASCII mode. In the new installation, when I select the backup file in ListMail's Restore section I get the following error:

Warning: fopen(./attach/2009-08-09_03-15-00.LM) [function.fopen]: failed to open stream: Permission denied in /home/charl242/public_html/mail/editconf.php on line 231
gz: could not open input and/or output file

Can anyone tell me what the problem is and how to solve it?

Thanks!
Chuck :)

mike2

  • Posts: 193
    • View Profile
Trouble Restoring Database
« Reply #1 on: August 10, 2009, 05:03:00 am »
.GZ files should probably be uploaded as binary...

Chmod it to at least 755 after uploading.

Chuckman

  • Posts: 8
    • View Profile
Still can't restore backup file
« Reply #2 on: August 12, 2009, 08:09:01 am »
I uploaded the gz backup file to the new server using Binary mode as you suggested, and comoded it to 755.

Still got the same error when I tried to restore the database:

Dropping old tables... OK Unzipping...
Warning: fopen(./attach/2009-08-12_11-27-53.LM) [function.fopen]: failed to open stream: Permission denied in /home/charl242/public_html/mail/editconf.php on line 231
gz: could not open input and/or output file

I decided maybe my server can't unzip gzip files.  So I backed up my old database as a simple LM file.

This time the database seemed to populate the tables.  But I got this error message:

Dropping old tables... OK Importing data - Please wait... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''Dear !fname,I’d meant to write you from last Friday, Jan 23rd, when I firstarri' at line 1

My server uses PHP version 5.2.6 and MySQL version 5.0.81-community

I don't know how to fix this.  I looked in the new server's listmail interface and all the lists and followups seem to be there.

But when I attempted to broadcast an email to a small list I get this error:

   admin-35-Table 'charl242_mail.lm_sendp' doesn't exist

I went into phpmyAdmin to look at the database and found only 9 of the tables were there.  19 tables were created by listmail on the new server during installation.  I checked the database on the original server and there were 19 tables there too.  So 10 tables were lost in the transfer.

I tried this several times and get the same results.

What do you suggest I do?

Thanks!  
Chuck

mike2

  • Posts: 193
    • View Profile
Trouble Restoring Database
« Reply #3 on: August 13, 2009, 07:05:43 am »
I would suggest trying to backup the DB using phpmyadmin and restoring it with phpmyadmin instead of even trying to use Listmail...

BGSWebDesign

  • Posts: 625
    • View Profile
    • http://www.bgswebdesign.com
Trouble Restoring Database
« Reply #4 on: August 26, 2009, 08:52:01 am »
Chuck,

The best way to accomplish this is with a MySQLDUMP command from the command line.  You can dump it to a .gz file (gzipped) which is a binary file.

Then you move it to your new host, unzip it and run a MySQL commnand to import the entire thing: mysql -p -h DBSERVER dbname < mydumpfile.sql

You may have to delete some of the commands in the file depending on what you included in the dump file, such as commands to recreate tables, etc...

Good luck.  Let me know if you have further questions.
Thanks,
-Brett
http://www.bgswebdesign.com/Contact-Us.php

*** I do custom List Mail Pro installations ***
Contact me through my website (above)