poodle restore error

poodle restore error

by velammal esakkiappan -
Number of replies: 5

when restore the course, the following error is come.

  • Checking user data
Some problems were detected when checking user data (Trying to restore user 'admin' from backup file will cause conflict)

An error has occurred and the restore could not be completed!

I am unchecking the admin role in backup. But the error come again. how to recover it.Thanks.
Average of ratings: -
In reply to velammal esakkiappan

Re: poodle restore error

by ben reynolds -

Hi,

Here's a long discussion on this issue. Please read the whole thing, as there is conflicting advice. http://moodle.org/mod/forum/discuss.php?d=142720

For my Bitnami Moodle Stack (localhost), I changed the admin and one other identical username before restoring the course. It worked for me, although I'm still unclear which admin accesses MyPHP, etc.

In reply to ben reynolds

Re: poodle restore error

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Open the backup zip file and then edit the moodle.xml file. Look for Admin and delete if anything in it. From memory, there may be more than just one instance of it in the file, so just keep looking until there is nowhere else to look.

<AUTH>manual</AUTH>
<CONFIRMED>1</CONFIRMED>
<POLICYAGREED>0</POLICYAGREED>
<DELETED>0</DELETED>
<USERNAME>admin</USERNAME>
<PASSWORD>not stored</PASSWORD>
<IDNUMBER></IDNUMBER>
<FIRSTNAME>Admin</FIRSTNAME>
<LASTNAME>User</LASTNAME>
<EMAIL>my.email@this.net.au</EMAIL>

and a bit more as well. DO NOT delete the tags, just username, first-lastnames email There is a bit more data and so on, but another way is to go do another backup and do not accept user files, user data, roles user files and so on. Just backup the course files, nothing else. Good luck...

Average of ratings: Useful (3)
In reply to Colin Fraser

Re: poodle restore error

by Glenys Hanson -

Hi Colin,

This is very useful.

Just to be sure, the modified part of the file should look like this:

<CONFIRMED>1</CONFIRMED>
<POLICYAGREED>0</POLICYAGREED>
<DELETED>0</DELETED>
<USERNAME></USERNAME>
<PASSWORD></PASSWORD>
<IDNUMBER></IDNUMBER>
<FIRSTNAME></FIRSTNAME>
<LASTNAME></LASTNAME>
<EMAIL></EMAIL>

Am I right?

Glenys

In reply to Glenys Hanson

Re: poodle restore error

by Colin Fraser -
Picture of Documentation writers Picture of Testers

Hi Glenys, not really, I rushed it in writing this, was going out last night.. that is only part of it, on mine it starts:

<USERS>
<USER>
<ID>2</ID>

 

this contains all the user ID of all users associated with the course.The ID number is not that important, but as I have four admins on my production site this is the first and I have had success at removing this one and getting the restore to work.   I have just deleted the data as you have shown, which includes contact details and times accessed and everything else relating to this id. It goes all the way to the next user, and includes user preferences:

<ROLES_OVERRIDES>
</ROLES_OVERRIDES>
<ROLES_ASSIGNMENTS>
</ROLES_ASSIGNMENTS>
</USER>   //the next user then starts...
<USER>
<ID>4</ID>

As an alternate:

Find and replace the string in the XML file

<USERINFO>false</USERINFO> //and there will be a few of them...

And delete ALL user information, from <USERS> to </USERS>but while I am confident this would work, I have never really tried it. You may also have to make sure that User data files are exluded too. (I only ever make one backup with all User files, that is the end of course just before I reset so never tried this. Scheduled backups take care of the other issues, this is the one for my own records.) However, it seems a logical extension.

The last bit I did not mention was that after editing, rezip it, upload and test by restoring it.

While a very useful tool, Moodle limitations will always get in the way. I have often found that User data, Roles and blocks and other bits and pieces will sometimes stop a restore when taking it from one production site to another, or from my work site to my private Moodle. (Funnily enough, it has never caused a problem the other way, and I am not sure why that is.)  I got into the habit quite quickly of just not including user files or user data in backups. For blocks and other mods, I just delete the offending block, usually non-core blocks or resource types, other plugins, nanogong causes an issue from time to time, from the XML backup - everything from <MOD></MOD>.  I have time to do it, as a chronic insomniac, but others don't and it can often be a long and boring processmixed.

Average of ratings: Useful (1)
In reply to Colin Fraser

Re: poodle restore error

by Glenys Hanson -

Hi Colin,

Thanks for the extra info. I'll try it out (on a copy) of one of my courses and let you know how I get on.

I have so many courses I can't restore that it's really frustrating. I want the user info (it's the students that write the interesting things, not me).

Cheers,

Glenys