Backup/Restore Help!

Permalink
I am trying to take a live/private development site and build a working copy of it on my local computer using MAMP and localhost so I can try ajaxing the site.

I've made working copies of sites using backup/restore in the past, with success - but the current site I'm working on gives me an error when I try and restore from the backup.

mysql error: [2006: MySQL server has gone away] in EXECUTE("INSERT INTO PageStatistics VALUES

followed by a ton of dates formatted like this: 1,1,'2012-04-12'

I have seen this error code on the forums before, but with only the advice of contacting the host. Since I am trying to use MAMP and localhost - I am guessing that means I need to contact me!

Any help would be greatly appreciated.

Here is my workflow:
Install fresh copy of C5 on my local server, without sample content, with default everything.
Clear cache on current site, then backup the site.
Download blocks, packages, and themes folders and place them in the local install
Download files folder contents, but just the folders with numbers, not the cache, thumbnails, trash, ... etc. folders
Put the downloaded folders into the local copy
Create backups folder in files folder and then download/place the backup file
Restore from backup in the local site

What happens:
I get the previously mentioned error - but the theme is applied, all files are available in the file manager(just need to be rescanned), and all custom attributes are available.
What doesn't work: no pages are created - there are a lot (currently 199, using over 1000 images), so it be great if I don't have to manually add all of the existing pages/content again

foster
 
foster replied on at Permalink Reply
foster
I have tried changing the permissions to 777 on a few folders, like files, blocks and packages, but to no avail.

Any ideas out there?
foster replied on at Permalink Reply
foster
Is it possible that my host is the issue? Could the database be corrupt?

Grasping at straws, but I really need to be able to move this site in the near future.
foster replied on at Permalink Best Answer Reply
foster
Got it!!!!!! Thanks to shyul on the Mamp forums. Remember to restart your MAMP servers after the change to the startMysql.sh file
http://forum.mamp.info/viewtopic.php?f=2&t=14115#p28568...


For anyone that needs it...
"One walkaround solution would be regarding the '...\MAMP\bin\startMysql.sh' start up batch file. Add the option "--max_allowed_packet=268435456" (change from the meager 1MB to 256MB).

And the content will be looking like:

# /bin/sh
/Applications/MAMP/Library/bin/mysqld_safe --port=3306 --max_allowed_packet=268435456 --socket=/Applications/MAMP/tmp/mysql/mysql.sock --lower_case_table_names=0 --pid-file=/Applications/MAMP/tmp/mysql/mysql.pid --log-error=/Applications/MAMP/logs/mysql_error_log &

By doing this, the problem of importing SQL formated backups larger than 1MB has partially resolved by expanding the limit from 1MB to 256MB."