HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Restore: Memory Issue

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#59552 (In Topic #12963)
Avatar

Well-settled

Restore on laptop fails

Hi there,

I'm still at the beginning of deploying OCP on our website. Looks very nice so far, but translating the entire system into German on my own keeps me longer than I thought. I'm nearly there…

Now I'm thinking of getting rid of some features I won't need on our website. Such as the pointstore, the promotion system and points in general. Wie aim at a bit "settled" audience of classic car drivers, who I think won't give a rat's a** (:$ sorry…) if they earn 10 points for posting a question in a forum. Having to use a forum at all is confusing enough for older folks.

Now the actual problem: I've set up an EasyPHP environment (in which ocp installs fine, yes I tried it) on my laptop and try to restore a full backup from the website. The website has next to no content yet, but the install.php (which is 16MB) keeps bailing out with memory allocation errors (Allowed memory size of 268435456 bytes exhausted (tried to allocate 402653184 bytes)). Which is a lot.

I do not dare to try a restore on the main server just for testing purposes, but I doubt it would work better in restricted hosted environment.

Have I stumbled into a known issue here?

Have a nice one,

Peter
Back to the top
 
Posted
Rating:
#59586
Avatar

Hi,

The install.php file contains code to execute queries to recreate the database, however I suspect PHP is being very inefficient in it's memory usage (it tends to be) and sucking up a lot of memory reading in all the code in that file.

We actually advise people not to use our inbuilt backup system as PHP is rather limited when it comes to this kind of thing – our recommendation is to use a server-level backup solution wherever possible.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#59596
Avatar

Well-settled

Chris,

That is kind of bad news. Unfortunately PHPMyAdmin or the like is not part of my hosted server package, so I shall have to make some deal with my hoster to see if they can make backups of our database for us on a regular basis. Which is clearly not part of their job at present.

Perhaps things would be a bit easier if we could separate the database dumpfile from the rest of ocp's own backup in a MySQL dump compatible format that can be fed into PHPMyAdmin. Just a faint idea.

Did you try a restore before? Is there any rough estimate for memory requirements? My database still is next to empty and restore bails out with 256 megs of RAM configured for php. Maybe there is some other php.ini parameter to look at?

Have a nice one,
Peter
Back to the top
 
Posted
Rating:
#59599
Avatar

Hi,

I have restored backups quite a few times during testing, but perhaps the machine didn't have a memory limit.

However it should be possible for you to install phpMyAdmin yourself on a server if you need it – it doesn't need any special access.

With regards dumping in MySQL format, it would be possible, but the reason it's not done is to avoid tying the backups to any particular database vendor. We could make it an option, but there are other issues with backups we can't avoid such as timeout issues during generation so I don't think it's worth the investment.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#59601
Avatar

Well-settled

Hi,

I whacked up php.ini's memory_limit parameter on my laptop to a full gig and came to a point where install.php actually starts to insert data into the database. But bails out again with [Unknown column 't0__text_original' in 'field list'] and a stack trace.

Ok, I'll be looking out for a provider-based schedulable backup solution then. It's just a club website and no corporate thingy, but what i've learnt from over 20 years as a network administrator is: A backup that can't reliably be restored is like an owl in a sack: of no man's use.

Have a nice one,

Peter
Back to the top
 
Posted
Rating:
#59605
Avatar

Community saint

Hi Peter! Do you have SSH access to your hosting account? If so, you have some more options available to you.

"no violence, no hate, no pain, no enemies
just peace, unity, tolerance and love" - The Beloved

OCP V7 | Advocating monetary reform - FreeOurMoney

Need OCP friendly hosting? Look no further:
Web Hosting, Reseller Hosting, and Dedicated Servers w/cPanel - Elief! - Official hosting partner for ocPortal.
Back to the top
 
Posted
Rating:
#59620
Avatar

Well-settled

Hi,

unfortunately, I have not got shell access. And don't really want to bother, because I'm not really big on the Linux commandline and have to rely on GUIs. I installed phpMyAdmin in the meantime and can make (manual only) backups of the db now. My hosting provider claims they do nightly database backups and keep them for 30 days. I have no access to those backups, but if anything goes pearshape, I can give them a ring and have the db restored.

I think I can live with that partly solution, as it enables me to transfer working copies of the website to my laptop. I'd prefer a reliable scheduled backup tool from within ocp though, that does consistent backups of files and db.

Have an nice one,
Peter
Back to the top
 
Posted
Rating:
#59632
Avatar

Attached is a fix for making backups correctly. It's been a bug since 4.3.0.

Attachment
sources/backup.php
» Download: backup.php (8 Kb, 95 downloads so far)


(I agree, a backup that won't restore isn't exactly useful. We always advise to test backups, so I'm glad you've been doing that. In this cas at least the data was there so a programmer would be able to 'fix' it if it really came to it.)


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: