Backup and Restore doesn't work

Backup and Restore doesn't work

by George Madson -
Number of replies: 8

Guys, when I try to do a backup, appear to me in the moodle Figures 1 and 2 below ...




But the figure 3 does not appear, the page is blank and no error message appears even with the “Debug mode” enabled and no information or error is logged in postgree.




Another detail important is that i can not do a restore, when i try the same thing happens, choose the course, when I ask to continue to restore an existing course for a new course or even to an existing one, to get a screen process frozen without errors and without any objects (buttons) with complete information on the status bar of the firefox3 or IE7 (I did the test in two)

Searching for information, I found this a discussion forum on the threshold of the type of data from postgree, but checking my basic noticed that my ID is not close to 2147483647, so this is not my problem.

4 bytes integer integer -2,147,483,648 usual choice is to 2147483647
BIGINT 8 bytes large-range integer -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

http://moodle.org/mod/forum/discuss.php?d=81530
http://www.enterprisedb.com/docs/en/8.3/server/datatype-numeric.html

Someone can help me? or may suggest some tests can i try to find the error?

Thank you,

George Madson

Average of ratings: -
In reply to George Madson

Re: Backup and Restore doesn't work

by Jared Stein -
Are these large courses?

My first guess would be that your server is not allowed to use enough memory to complete the task. I would have the admin check this.
In reply to Jared Stein

Re: Backup and Restore doesn't work

by Rob Gjertsen -
The courses backup archives range in size from 45,426KB -> 460KB, however there does not seem to be any pattern to where the error occurred.

When you say the server is not allowed to use enough memory. Would this be the server that the backup was originally created on, or on which I'm trying to restore the backup file (they are two separate servers).
In reply to Rob Gjertsen

Re: Backup and Restore doesn't work

by George Madson -
I have 2 servers, one running a moodle and another running the database(postgree).

>>> Example of a backup: backup file-adm002-20080107-0918.zip SIZE 6.1Mb
Adm002 file-backup-20080107-0918.zip SIZE 6.1Mb

Ask: I need the backup files in this range in size: 45426KB of the 460kb?

Moodle Version: 1.8.3 (2,007,021,530)
Backup Version: 1.8 + (2,007,022,100)

On restore screen, i select to restore:
users will not
files the user does not
archives of course yes

I will try to back up a little course and restore the same.
In reply to Jared Stein

Re: Backup and Restore doesn't work

by George Madson -
I had a backup of a course of 10KB and unable to restore. Also created a course empty and I could not back up, I believe the problem is not related to the size of the files, because my backup and restore worked before with my courses large and small.
In reply to George Madson

Re: Backup and Restore doesn't work

by George Madson -
Thanks Friends!

Following the tip http://moodle.org/mod/forum/discuss.php?d=109022&parent=478872, the code also changed the value of variable between the award and the test, then, instead of changing the contents of the variable, decided to changing circumstances.

line 125 (backup.php)
} else if ($launch == "execute" or $launch == "ute") {

Line 154 (restore.php)
} else if ($launch == "execute" or $launch == "ute") {

Average of ratings: Useful (1)
In reply to George Madson

Re: Backup and Restore doesn't work

by Aaron Milavec -

After having flawless backup and restore for a full year, my 1.8.1 version suddenly froze up at the last leg of the procedures.

Thanks to George, I'm up and running, at least as far as backup is concerned.  The import function also functions but generates twenty or so small errors.  The restore function stilll hangs up.

I'm trying to make sense of the Spanish.

Aaron

In reply to George Madson

Re: Backup and Restore doesn't work

by Aaron Milavec -

After having flawless

backup and restore functions for a full year, our 1.8.1 version of Moodle suddenly froze up at the last leg of these procedures.  The "backup" allows us to save part or all of the entire content of courses and the "restore" allows us to  transport part or all of these courses into other courses.  Thus, the web pages dealing with how to enroll, the privacy curtain, posting ones hunches and ideas for others to see all can be easily transported to a new course.  Meanwhile, as the modes of expression in one area improve (due to feedback from participants or fresh ideas on my part), then it is quite easy to bring the improvements in one course to bear upon all the earlier courses as well.   

 

So when the backup and restore functions ceased to work, I was surprised and than a bit alarmed.  Moodle has worked so flawlessly for the last year, that I had become rather complacent about its invulnerability.

 

My first thought was that the problem was created by our server in San Diego, so I gave them a phone call and asked a good dozen questions.  No, nothing changed on their end.

 

So, then I began taking a closer look at Google php files.  Moodle did generate a code error telling me that the problem was the following:

 

Notice

: Undefined variable: nonrestmod in /usr4/home/catherinecollege.net/htdocs/moodle/backup/restore_form.html on line 328

 

Thanks to my earlier work in programming, I knew very well what an "undefined variable" was but I didn't have a clue as to where "nonrestmod" gets its content and, more importantly, why (suddenly) after a full year of flawless operation, it suddenly failed to get its content.

 

So then I went to the discussion boards for Moodle.  Quite fascinating really!  Tens of thousands of users are recording their successes and failures, their improvements and their revisions to Moodle.  So I did a search for ver. 1.8 and "failure to backup."  This brought it down to ten posts.  It was comforting to know that others were experiencing exactly the same problem that I was.

 

After a few hours of altering small bits of code (always clearly recording what changes I made so that, if the whole thing crashes, I can always go back to an earlier working condition), thanks to the discussion of George M., I was up and running, at least as far as backup is concerned.  The import function also functions but generates twenty or so small errors.  The restore function still hangs up.

Some of the posts were in Spanish so I was stretching my feeble language abilities to make sense of it.  Then I thought of using the Google language translator.  Here is the first line of a post:

Bom.. o mesmo problema acontecia comigo e no meu caso foi observado o seguinte:  pós avaliar os fonts do site constatei o seguinte:

The translator (

Bom .. Comigo same problem or event and my case was not observed or Seguinte:
postoperative fonts do you evaluate the site or constatei Seguinte:

What?  This is barely intelligible.  Why isn't "comigo" (the verb, ending suggests first-person singular subject) being translated?  From context, I could guess that "sequinte" means "the following," yet it too is not translated.  Could it be that the Spanish user is using technical words that the Google translator is incapable of translating?  Maybe.  Yet, I wouldn't expect this to show up in the first line.  So maybe it's not Spanish.  So, I try Portugese and get this:

Good. The same problem happened to me and in my case was noted:
after assessing the site's fonts found the following:

Ah, much better.  So it is Portugese!  Here are the changes I made:

http://translate.google.com/translate_t#) gave me this:

 

Found solution at

Original code in both places: } else if ($launch == "execute") {

Changes made:

line 125 (backup.php)
} else if ($launch == "execute" or $launch == "ute") {

Line 154 (restore.php)
} else if ($launch == "execute" or $launch == "ute") {

 

While exploring the php files, I came across this ominous note:

 

This directory contains my try to create a backup/recover
admin option to moodle. I don't know when and how it'll be
finished, but I'm going to try it, sure.

 

Some day, if this is fully functional, it could be integrated
into the main Moodle distribution (ask uncle Martin).   smile

 

Code here may not be tested - so there are no guarantees as
to the quality of the code in here, even if part of a stable
Moodle release.

So what is the upshot of all this?

 

1. The backup and restore functions that worked flawlessly for one year now demonstrate deep flaws (bugs).  Why?  I don't know. . . . and I don't have the time to find out.  [Help appreciated!]

 

2. I want to upgrade our current Moodle 1.8.1 to following the advice of the managing director of Moodle,

Martin Dougiamas, who says the following:

 

Each of the new releases contains long lists of minor bug fixes (see the ...

 

I note also that the 1.9 version has upgraded the grading system and the  teacher's grade book--features that are of no current interest to us.  Moreover, since this is my first upgrade and since I notice many posts regarding features that fail to work after an upgrade, I do not want to make the leap to 1.9 until maybe a year in the future.  So here is what I plan:

 

1. In the next two weeks, I'm going to upgrade our Moodle system to 1.8.6.

 

2. I will choose the date to fall on the day after our server in San Diego does its weekly system backup.  This will allow us to scrap the entire upgrade and to revert back to 1.8.1 just as we left it SHOULD SOMETHING DRASTIC GO WRONG.

 

3. I've also made a CD-rom copy of our entire Moodle system as it exists on my hard drive in my office.  Since I've made a half-dozen code changes that improve the system, this will allow me to recover any or all of these changes and to import them into the new php files that will be overwritten in the upgrade.

 

If you have any suggestions for me, they will be very welcome.

 

Thanks,

Aaron


Dr. Aaron Milavec
2739 Queenswood Dr.
Cincinnati, OH 45211
Vice-President
Catherine of Siena Virtual College
www.catherinecollege.net
www.didache.info[More] release notes for details). Thanks to all the developers and users who helped with finding and fixing these.

Several security vulnerabilities were also fixed in all versions, making it important that you upgrade existing Moodle sites.

Even if you can't make major upgrades in the near future, you should at least upgrade to the latest stable package for your version. (For example if you have 1.8 already, then it's very safe and easy to upgrade it to the new 1.8.6 because there are no new features, just bug fixes). 
http://www.ohloh.net/projects/moodlehttp://moodle.org/mod/forum/discuss.php?d=109022
In reply to Aaron Milavec

Re: Backup and Restore doesn't work

by Dennis Schaffer -
I have been running 1.8.3 for several months and experienced this same problem. After fighting to make restore work at all earlier in the year, it seems to have stopped functioning.

The code edit described above does in fact do the trick for my installation. I can restore some or all parts of a course to a new course... just in time for the new quarter starting in January!

I sure hope that this repair is included in 1.9 and above, because I plan to migrate shortly.