Jump to:

22998 Posts in 11620 Topics by 2827 members

General Questions

SilverStripe Forums » General Questions » MySQL backup is huge, and how to fix it

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

Page: 1
Go to End
Author Topic: 1081 Views
  • Bruce B
    Avatar
    Community Member
    145 Posts

    MySQL backup is huge, and how to fix it Link to this post

    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

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: MySQL backup is huge, and how to fix it Link to this post

    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();

    1081 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.