Course Backup Problems Moodle 2.0

Course Backup Problems Moodle 2.0

autor Brian Harvey -
Počet odpovědí: 26

I have several courses in a Moodle installation and have just converted the application from 1.9 to 2.0.  I am trying to backup one of the courses to pass it off to a client to allow them the reload it into their own installation.  However, all I get when choosing Backup from the administration menu is a blank screen.  I've checked the Backup FAQ and there isn't anything there to help.

Does anyone have any ideas?  Could I use PHPAdmin to backup the database and pass that over to the client?

Průměr hodnocení: -
V odpovědi na Brian Harvey

Re: Course Backup Problems Moodle 2.0

autor Stuart Mealor -
Obrázek: Particularly helpful Moodlers

Hi Brian

I've not seen a blank screen when Backing up an individual in Moodle 2.0.
However, we did encounter a problem with courses that used Spanish characters in the Category or Course name.  Might be worth checking the Course name is simple?

Yes, you could use phpMyAdmin or other similar application to backup (export) your database, but that would be the complete database, not just one course.  Also, you would need to supply the moodledata files too the client.

Is the client also using Moodle 2.0 ?
Because if they are not using the same version as you are developing on thsi could cause an issue.
Might be best using one of your 1.9 backups as a starting point for maximum 'transportability'?

Stu

V odpovědi na Brian Harvey

Re: Course Backup Problems Moodle 2.0

autor Lisa Perez -

Have you found an answer to this?  I'm having the same problem.  Thanks.

V odpovědi na Lisa Perez

Re: Course Backup Problems Moodle 2.0

autor Emma Richardson -
Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Plugin developers

I was having issues with this until I changed the maximum timeout in php.ini.  If you turn on debugging, I think you will see that that is the issue.

V odpovědi na Emma Richardson

Re: Course Backup Problems Moodle 2.0

autor Robert Aucoin -

I am having the same problem. Clicking backup or restore just gives me a blank screen. And I don't see a files folder in any new courses I have created. Perhaps that is a feature or design change.

In terms of the php. ini, could someone provide more information on this? I am not a server admin so go gently. I don't see a php.ini file anywhere on the server? Where should it be? I did a search. Is it possible for me to simply "dump" a php.ini file onto the server somewhere?

Robert

V odpovědi na Robert Aucoin

Re: Course Backup Problems Moodle 2.0

autor William Mead -

php.ini is the settings file for the actual PHP environment on your server. It is where you set how much memory PHP has, how large a file it can upload, and a great many other things.

You may or may not have access to the file, depending on how your server is set up. On some servers, you can put in your own php.ini file and have the setting you choose over-ride the settings everyone else uses, but that is pretty rare these days, I think.

If you need to change the way PHP works, best bet is to talk to your system administrator.

-Bill

V odpovědi na William Mead

Re: Course Backup Problems Moodle 2.0

autor Robert Aucoin -

Thanks for this. It looks like I do not have access to the file. What would the settings be for the file so I can relay this to the sys admin?

V odpovědi na Robert Aucoin

Re: Course Backup Problems Moodle 2.0

autor Colin Fraser -
Obrázek: Documentation writers Obrázek: Testers

You may want to refine the issue more before talking to your sys admin. Try the debug messages first. Go to Site Administration > Development > Debugging and select Debug Messages: ALL: Show all reasonable PHP debug messages then run a backup and se if the error messages are matching what is being talked about here. It may be something else.

The sys admin will (should) know what file you are talking about, it resides in the PHP directory, and controls how PHP interacts in the environment. It has a number of settings included those mentioned here. Make sure you understand what is happening first - you can wreck your own credibility if you don't. Or cover yourself by admitting you are not sure of what is happening, but you think that ... and so on.

V odpovědi na Colin Fraser

Re: Course Backup Problems Moodle 2.0

autor Robert Aucoin -

This is very helpful. The error I am getting is:

"Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 18655 bytes) in /home/avan2571/public_html/moodle/lib/outputcomponents.php on line 838"


I go to said file and said line number and see: "return self::start_tag($tagname, $attributes) . $contents . self::end_tag($tagname);"

This means nothing to me and I am not a server/programmer type person so I have no credibility to lose úsměv

Thoughts?

V odpovědi na Robert Aucoin

Re: Course Backup Problems Moodle 2.0

autor Tim Hunt -
Obrázek: Core developers Obrázek: Documentation writers Obrázek: Particularly helpful Moodlers Obrázek: Peer reviewers Obrázek: Plugin developers

The exact line of code does not matter. That error message is saying that the server did not have enough memory to do what you asked it. Exactly where in the process it runs out of memory is pretty much random.

The memory is no limited by the actual amount of memory in the server. Rather, there is a PHP setting that controls how much memory one request can use. That is the limit you are hitting. You need to raise it.

V odpovědi na Tim Hunt

Re: Course Backup Problems Moodle 2.0

autor Robert Aucoin -

Thanks. That seems to have worked except my back up files are 1.x and therefore not restorable. I will wait for the new version I guess.

V odpovědi na Brian Harvey

Re: Course Backup Problems Moodle 2.0

autor Tamara Cowling -

I am also having a problem with this. Pressing the back-up button loads a blank page and the word 'done' appears that the bottom. 

I'm not great with php etc but have been able to resolve most admin problems I have encountered. I have tried resetting the php.ini to the maximum timeout and uploaded the latest stable build (2.1).

Any other suggestions would be appreciated.

V odpovědi na Tamara Cowling

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

I am having a similar problem with Moodle 2.4.1, when attempting a backup on one course the screen goes blank and that is it ... no other message. When I enable debug messages I receive the following message:  

Fatal error: Class 'backup_certificate_activity_task' not found in /home/solution/public_html/site.url/backup/util/factories/backup_factory.class.php on line 107

I am simply the Moodle Admin and don't have access to the server files.  Any suggestions on solving this issue would be appreciated.

 

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

@Dan

Do you have a certificate add-on installed/active in the Moodle?

If so, temporarily hide the certificate mod. 

Site Admin menu, Plugins, Manage Activites ... and click the eye icon in the row for certificate.

And then let's see if you can get into that course.  If you can, and the certificate activity shows in the course, hide it.

If that works, run the backup, but don't select the certificate activity to be included.

'spirit of sharing', Ken

V odpovědi na Ken Task

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

Hi Ken,

I do have the certificate plugin installed in this Moodle and, as it happens for the 6 courses that I have setup so far, this course is the only course that I get a blank screen when attempting a course backup and it is the only course that I have activated the certificate plugin.  I tried your suggestion but it doesn't help.  Interestingly, if I click the restore button the restore screen appears, though there is nothing to restore as I cannot get the backup screen.

Thanks for your suggestion ... I was thinking that it may have to do with this plugin or the questionnaire plugin, because these active plugins are the only difference between this course and the courses I can backup.  I also tried your suggestion on hiding the questionnaire plugin as you suggested for the certificate plugin ... hiding them both.  That also made no difference.

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

@Dan

We've sort-a hijacked a thread with Moodle 2.0 in the subject line. 

What is your version of Moodle?  (specifically)

Are the certificate and questionaire add-ons at their latest/greatest versions?  If not, update them.

'spirit of sharing', Ken

 

V odpovědi na Ken Task

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

Hi Ken,

I am using Moodle 2.4.1 (Build: 20130114).  I have the most recent versions of both certificate plugin and questionnaire plugin.  I actually posted this on its own thread on March 7th (https://moodle.org/mod/forum/discuss.php?d=224016#p973320), but received no response so thought that I would try this thread.

Thanks, Dan

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Derek Chirnside -

Ken, Have a read of this tracker item: https://tracker.moodle.org/browse/MDL-34388

-Derek

V odpovědi na Derek Chirnside

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

@Derek

Was aware of it ... ran across it before ... the tracker posting that is. I do see it's for Windows.  So while similar, not the same with a Linux (CentOS/RHEL) boxen.

Not sure it's related to this problem however.  BUT ... thanks for sharing!

'spirit of sharing', Ken

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

Hi Ken,

I thought you should know ... it is the certificate plugin causing the problem with the backup.  I completely deleted the certificate activity from the course and I was then able to see the backup screen. 

Thanks for your suggestions.  I guess this will be a bit of a nuisance if everytime I do a backup of the course, I have to delete the certificate plugin.

Dan

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

@Dan

Welcome.  Got another idea ... something else to investigate.  Have a 2.4.x+ with certificate and in a course active.  Backup with no problem.  Restore with no problem.  The certificate settings are basic.  In the problem courses with certificates, check to see if they have something in common in settings of the certificate ... like an image that was uploaded.

Otherwise, you are right, kinda annoying to have to remember to un-check the certificates every time one does a manual backup ... and of absolutely no use should you ever turn on automated backups. mrzutost

'spirit of sharing', Ken

V odpovědi na Ken Task

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

Hi Ken,

Yeah ... we want to set-up automatic backups úsměv 

Anyway, I also have another site, exactly the same Moodle 2.4.1 (though different host).  I setup the certificate exactly the same, uploaded the same graphics, made the same changes to the language package, and I can backup the course with no problem.  As well, in the course with the problem, I again setup the certificate and, again, I can't backup the course.

Dan

 

V odpovědi na Dan O'Reilly

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

Well, there has to be something different - works on one host/course, doesn't work on other host/course.

The error reported gave a php file and a line of code.

That section of the file reported and line of code:

        // Check moduleid exists
        if (!$coursemodule = get_coursemodule_from_id(false, $moduleid)) {
            throw new backup_task_exception('activity_task_coursemodule_not_found', $moduleid);
        }
        $classname = 'backup_' . $coursemodule->modname . '_activity_task';

If I read that right, sounds like it can't find backup_certificate_activity_task.class.php.

See if you have in /mod/certificate/backup/moodle2/

backup_certificate_activity_task.class.php

file.

And check permissions/ownerships on all files folders in

/mod/certificate

'spirit of sharing', Ken

 

V odpovědi na Ken Task

Re: Course Backup Problems Moodle 2.0

autor Dan O'Reilly -

Hi Ken,

I wanted to get back to you on this but for a variety of reasons I was not able to test out your suggestion until this weekend.  We checked that the file was there and the permissions were set to 0755.  And it hasn't helped.  When a certificate is installed in a course, I cannot backup the course.  Once I delete the certificate from the course then I can backup the course.  I am going to try replacing the file backup_certificate_activity_task.class.php from the zip download for that version of the certificate and if that doesn't work then uninstall the certificate and re-install the most recent version of the certificate.

Thanks for your suggestions.

Dan

V odpovědi na Brian Harvey

Re: Course Backup Problems Moodle 2.0

autor Samantha Ciurlej -

Is this tread still open? I'm getting the same blank page and when I enabled debugging I got these two errors:


Warning: require_once(/home/site/public_html/site.com/backup/util/loggers/error_log_logger.class.php): failed to open stream: No such file or directory in/home/site/public_html/site.com/backup/util/includes/backup_includes.php on line 70

Fatal error: require_once(): Failed opening required '/home/site/public_html/esimplemediaplus.com/backup/util/loggers/error_log_logger.class.php' (include_path='/home/site/public_html/site.com/lib/zend:/home/site/public_html/site.com/lib/pear:.:/usr/lib/php:/usr/local/lib/php') in/home/site/public_html/site.com/backup/util/includes/backup_includes.php on line 70


Can anyone help?


Thanks!

V odpovědi na Samantha Ciurlej

Re: Course Backup Problems Moodle 2.0

autor Ken Task -
Obrázek: Particularly helpful Moodlers

@Samatha ... while this thread appears to be related, probably best to post in a new thread rather than 'piggy backing' on this thread. úsměv

Dunno if moderator would move to a new or not ... soooooooooo ...

Fatal error points to:
/home/site/public_html/esimplemediaplus.com
That's your site directory ... where moodle code resides.

But the warning points to: /home/site/public_html/site.com

That's two different domains.

Can see a Moodle site at the e....com domain via browser but no site.com.

You might need to contact provider and inquire about your account files/setup.

'spirit of sharing', Ken