Restore Issues

Restore Issues

by Charles Harris -
Number of replies: 20

I've created a back-up of a course, we've started a new semester however I have noticed some problems with hiding week material some two weeks will not hide.  Additionally, course content for the first and 2nd week disappeared. 

At this point I have done an analysis on the moodle database and found no errors.  I've tried to restore the course and I get a response that it is going well the stops with a little pink box that states an error has occured, and a link to continue.

My question at this point is how do I restore the backup at this point?  Can I delete the course in its entirety and restore it to normal?  I've got two backups at different dates and the backups went well. 

This is what I end up with during the restore.

  • Creating temporary structures
  • Deleting old data
  • Copying zip file
  • Unzipping backup
  • Checking backup
  • An error has occured

Continue

I'm using 1.1.

Thanks

Average of ratings: -
In reply to Charles Harris

Re: Restore Issues

by Girishan Shanmugam -
Hi,

Im having a similar problem with the restoration. The backup went smooth , but during restoration . I get the following message

  • Using existing course
    • From: DEMO 104-501: Course for Active Demonstration (DEMO 104-501)
    • To: DEMO 104-501: Course for Active Demonstration copy 1 (DEMO 104-501-1)
    • Adding data to existing
  • Checking sections
  • Creating users
Could not restore users.
An error has occurred and the restore could not be completed!

All three restore
  • Existing course , deleting it first
  • Existing course, adding data to it.
  • New Course
Im using Moodle 1.1.1 and a PostGreSQL database.

Any suggestions or ideas?
Thanks.
In reply to Charles Harris

Re: Restore Issues

by Boyd Mitchell -

Us as well, we are having the exact same issue.  We had no problems with the backup.  But the restore is not working.

I have tried backing up from server1 to a different server (server2) and it came up with the same thing....

  • Creating temporary structures
  • Deleting old data
  • Copying zip file
  • Unzipping backup
  • Checking backup
  • An error has occured

So then I tried a backup from the same server (server2), and we still get the same issue when I try to restore to that same server (server2).

Anyway, thanks for the help in advance.

Boyd

In reply to Boyd Mitchell

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Charles, Girisham, Boyd and Jacob,

I think that you are talking about two different problems.

First, the "Checking backup" problem: The restore process checks the format of the .zip file before trying to restore it. Due to some unknow problem, your .zip files seems to be incorrect. Charles and Boyd, can you tell me the status of your "zip" and "unzip" variables (in admin/variables), and the server where you are running Moodle (CPU & OS) ? If they aren't empty, can you try the restore again leaving them blank ? Any comment will be welcome.

Second, the "Creating Users" problem: It seems to be some problem with some user in your backup file. Perhaps some strange character (no UTF-8 compatible) or similar. Can you verify this, Girishan and Jacob ?

About this issue, Jabob, I've read your http://moodle.org/mod/forum/discuss.php?d=4519 discussion and I think that the difference between your root directory cannot be the cause of the problem and it's very strange that, changing it, your restore has worked fine, because the restore of the users is independent of that variable at all.

Anyway, after confirming my previous comments, if you are not able to restore the course, if you (the Fantastic Four big grin) want, you can send me your backup file privately to analyze the cause of your errors in my test server.

TIA and ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Charles Harris -

Eloy,

I running on an Intel platform with Win2000 Advanced Server and IIS.  I'll take a look at the zip/unzip variable tomorrow.  Tell me what I should be looking for.

Thanks

In reply to Charles Harris

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Charles,

the zip/unzip variables should be empty. Then, the restore should work fine. I suposse that you are using Moodle 1.1.1 (not 1.2dev) isn't it ?

Anyway, if you send me your problematic course, I'll be able to test in my server. In the past, I've detected some cross-platform problems with zip files and it could be the root cause of your problem.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Jacob Romeyn -
On the "Configure automated backups and their schedule , if I leave the Save To: blank,  everything works fine.
But when I put in a path, the backup does not seem to work.

The path I put in is the absolute path: /home/bccanet/public_html/backup/, is this correct?
In reply to Jacob Romeyn

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Jacob,

The "Save To" field in scheduled backups, when blank, every course's backup is saved to its "habitual" directory, ie. the "backupdata" inside the course main directory. When specified (not blank), every backup in the process will be saved to the specified path.

Anyway, I've included some checks to avoid trailing slashes (and backslashes) in that variable and to detect if the specified path exists in your server.

So, if you delete the trailing slash from the path in your previous post (/home/bccanet/public_html/backup), every course's backup should be copied to that directory (if you have the correct perms to write there, of course).

It's in CVS now smile

Please test it and report some feedback...

TIA and ciao, smile
Average of ratings: Useful (1)
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Jacob Romeyn -
Exelentbig grin.  During the nightsleepy . Cron went to work approve.  And in the morningwide eyes.  Over 100 backup files in one directorycool

Thank you for continuous and helpfull answers and work.

Jacob
Average of ratings: Useful (1)
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Jacob Romeyn -
Hi Eloy

I updated  with the latest Moodle 1.2 dev  and no longer have automated backup workingsad

I made no other changes to the setup, any sugestions?
In reply to Jacob Romeyn

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Jacob,

why do you know that scheduled backups are not working ? Did you receive the "Backup Status" email ? Can you execute the admin/cron.php url manually to see what happens ? Do you save backup files to its "standard" location (leaving blank the "SaveTo" field, o to a specific directory ?

In my test server (with the lastest version smile), all seems to work fine...
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Jacob Romeyn -
Hi Eloy

Every thing is working fine now.   I am still not sure of the time of the backup settings.
At 15:00 on saturday 1/31 2004,  I set set backup to start at 16:00.   This morning 2/1/2004  9:00 I did not have a backup.   But  when I looked  this afternoon  all backups where in my backup directory.  Backed up at  2/1/2004 4:02 PM.thoughtful


In reply to Jacob Romeyn

Re: Restore Issues

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Backup timing changed recently.

The scheduled times are now relative to the main admin account, not the server time.

Perhaps in this case you accidentally had Saturday unchecked?  Or perhaps there was some confusion when you upgraded and things changed from on to the other?   Anyhow, should work from now on.
In reply to Jacob Romeyn

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Iepa Jacob (spanish hi), smile

are you sure that you set the backup settings at 15:00 ? Can that be done at 15:55 ? At what interval do you execute Moodle cron ?

I say this because to execute the scheduled backups two cron executions are needed. In the first, next scheduled backup times are calculated, in the second the scheduled backup start running. So, if your first cron was executed *after* on *o'clock* Saturday 1/31/2004 16:00, then the scheduled bakup time was calculated to one day in the future (2/1/2004 16:00), exactly as you say.

This can be the reason, ciao smile
Average of ratings: Useful (1)
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Bryan Williams -

Eloy,

I cannot get Backup to function on my latest installation.  Is there something in cron on the server that needs to be set that is independent of Moodle Backup property settings (i.e. time/date etc.)?  I did another Moodle installation last night and set the backup to occur at 2:00AM.  This morning when I looked in moodledata|temp|backup folder there was nothing in it.  Is this where the backup is supposed to be located?  What am I not understanding here? Step-by-step would help.

In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by Bryan Williams -

Eloy,

I have just installed the latest from CVS (2004013101) and made a new installation so that I could restore all site files from an existing installation (2004011700).  When I try to Backup all SITE files in 1700 (same with 3101), nothing seems to happen.  I cannot locate the zip file I guess its suppose to create in either the Backup folder or the Course data directory.  When I just backup a COURSE, everything works fine. Can you give me any advice as to what might be going on?

Thank you,
Bryan

In reply to Bryan Williams

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Bryan,

I suppose that when you say "...try to backup all SITE files.." do you want to say that you are using the scheduled backup option, isn't it?

Do you have cron running in your server ?
What are the settings for your scheduled backup ?
Do you reveive any email about the "Backup Status"?

Ciao smile
In reply to Bryan Williams

Re: Restore Issues

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

Did the same update at about the same time and it works fine (but the long database update... I was worried to get a time out)

Eloy, is it possible to put a "test" button or a "backup now" button on the interface to force an immediate backup of all courses or is there already a possibility to do so?

The path in the scheduled backup: does it has to be an existing path or can it be made by the backupproces (owner-issue)

In reply to koen roggemans

Re: Restore Issues

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Koen,

although the "Backup Now" button is a possibility, I think that it shouldn't be a priority for now. The main reason for this is that the scheduled backups utility has been planned to be executed inside the cron system and now, for me, the focus is to make it runs "perfect" (well, near perfect smile) and to include all the new functionalities in Moodle inside the backup/restore (groups, new modules...).

As as trick, you can adjust the scheduled backup settings to be executed 5 minutes in the future, execute the admin/cron.php manually (once) and, if you have the cron system running in your server, in its first execution, the backup of all your courses will be done.

If you leave blank the "Save to" path, then every course is saved in its own files area (i.e. under the backupdata directory inside each course). If you specify some *real* path (it has to exist and doesn't end with slashes) all the backup files will be saved there.

Hope it helps, ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore Issues

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators

Hi Eloy,

I didn't mean to rush you with the button-suggestionblozend. I see you'r posts in CVS and I can imagine it's quite a job to keep the backupfunction backuping everithing in Moodle, since the developement goes at warp-speed cool.

Good tip on the test for the backupfunction.

Also good tip in the slashes blauw oog

Thank you for the reply and for maintaining this great feature. The scheduled backup was realy welcome