Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

MySQL backup is huge, and how to fix it


Reply


2 Posts   1166 Views

Avatar
Bruce B

Community Member, 147 Posts

31 January 2009 at 6:15pm

Today I backed up my site using the Export function in PHPMyAdmin. The final uncompressed file was 85 Mb. One reason for the backup was to load the data back into the local version running on my laptop. Needless to say, loading a 85 Mb file took quite a while.

While this was happening, I discovered that most of the file size came from the PageView table. Since this is effectively a set of log files, the size is not surprising but it made backing up and restoring a real pain. I didn't need the data and excluding that data gave me a 17 Mb file.

I guess this is just a warning for others - don't include the PageView table in your backups unless you really need to back up that data. Alternatively, back it up separately, so you can restore without it.

And finally, if you have access to the PHPMyAdmin folder on the machine you are restoring to, here is a way of getting around the 2Mb limit on file imports:
http://www.givegoodweb.com/post/82/phpadmin-upload-restriction

Avatar
dio5

Community Member, 501 Posts

1 February 2009 at 5:47am

Edited: 01/02/2009 5:48am

AFAIK PageView table is used for statistics, which is a separate module from 2.3 onwards if I'm correct and not included by default. (Yay!)

I haven't been able to open the statistics part in the cms - out of memory errors - even though I have more than 90MB memory limit.

If you want to stop the pageview table from growing, comment out this in sapphire/core/control/ContentController.php

//Statistics::collect();