Author Topic: Backup & Restore fail  (Read 4838 times)

ksorbo

  • Freshman
  • *
  • Posts: 11
    • View Profile
Backup & Restore fail
« on: July 05, 2011, 10:33:48 am »
I am moving our Feng installation from one server to another.

I backed-up all data using mysqldump. (The resultant sql file was around 50Mb in size) Upon investigation, the og_file_repo table was about 40 mb of this total.

When I attempted to restore, I was not able to successfully restore to the new server. It would always error out right around the og_file_repo table. This is really scary because I have run daily backups using mysqldump. If I cannot restore from a backup, this system becomes very unreliable.

By separating out the og_file_repo table portion of the backup file, I was able to get the majority of the restore process to work.  I ran the og_file_repo table portion of the sql backup file on its own and it APPEARED to work.

However, now, when I attempt to view ANY document in the system, I get an error:

Error
We are sorry, but Feng Office is not currently able to execute your request. An Error Report has been sent to the administrator.


I am not able to access ANY of our documents and there are many.

What are my options?  Is there any way to export all documents and reimport them into the new system?

nicname

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: Backup & Restore fail
« Reply #1 on: July 05, 2011, 01:59:00 pm »
>When I attempted to restore, I was not able to successfully restore to the new server. It would always error out right around the og_file_repo table.

Which error ?

ksorbo

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: Backup & Restore fail
« Reply #2 on: July 06, 2011, 12:13:11 pm »
It gives the Mysql error,"Mysql has gone away". I have about 700+ files in this table but it stops restoring at around 300+

nicname

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: Backup & Restore fail
« Reply #3 on: July 06, 2011, 01:12:59 pm »
can you edit the server configuration ? if yes, set the timeout temporarily to a higher (3-4 times) limit.
if not, split the file in multiple chunks , so just add 100 lines. let it process, and then add another 100

ksorbo

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: Backup & Restore fail
« Reply #4 on: July 06, 2011, 05:09:59 pm »
I  can change the time outs.

Unfortunately, many of the single insert statements are more than 100 lines (wrapped) each!

I wonder if anyone else faces the issue of having large tables caused by including file content in the blobs. It is really scary not being able to restore from backup.

What I may have to do is to actually write a php script to read each record from the old server and insert into the new server.

nicname

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: Backup & Restore fail
« Reply #5 on: July 07, 2011, 01:02:29 am »
it should with a higher timeout, just try it. and if it still fails disable it for local connections.


and 100 lines per statement was just an estimate in case you cant change the values

ksorbo

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: Backup & Restore fail
« Reply #6 on: July 14, 2011, 03:58:19 pm »
Which timeout are you referring to? Here are my settings:

max_allowed_packet = 1048576
connect_timeout = 10
interactive_timeout = 28800
net_read_timeout = 30
net_write_timeout = 60
wait_timeout = 28800

max_connections = 100
net_retry_count = 10

This app is not running on localhost. It is running on a dedicated db server.

nicname

  • Freshman
  • *
  • Posts: 35
    • View Profile
Re: Backup & Restore fail
« Reply #7 on: July 17, 2011, 10:58:42 am »
It's the connect_timeout  variable

ksorbo

  • Freshman
  • *
  • Posts: 11
    • View Profile
Re: Backup & Restore fail
« Reply #8 on: September 08, 2011, 12:14:47 pm »
THANKS!

The connect_timeout setting did the trick.