Restore of anonymized backup

Restore of anonymized backup

by Itamar Tzadok -
Number of replies: 7

Restore of anonymized backup creates new (anonymous Australian big grin) users. black eye

What's the point of that?

The most important reason I can think of for creating anonymized backup is to be able to provide content packages such that the content does not contain any info on the provider's environment, and when the recipient adds the content to his/her course/site the content should be assigned to him/her (and not add users!).

Am I missing something here? smile

Average of ratings: -
In reply to Itamar Tzadok

Re: Restore of anonymized backup

by Dan Poltawski -
I'm not too familiar with this myself, but I will guess: The simple answer as to why we create these users is because all 'artefacts' are tied to a user, we can't just remove the users completely so we need to tie them to someone. If we assign to all one user then we may break rules (e.g. only one assignment submission attempt allowed).

In the case of content packages, surely you'd not backup user data at all?

I think anonymized backup is more useful for purposes such as debugging or demo sites.
In reply to Dan Poltawski

Re: Restore of anonymized backup

by Itamar Tzadok -

Consider the possible uses of a module such as the database. As a resource the content of the module instance is in user entries. So an instructional designer or content developer may create a resource application based on this module and add a couple of entries either as a starting point or as samples. But the designer may work in one moodle environment while the package will be installed in another.

In most cases this shouldn't break any rules because users who are allowed to install packages usually have enough permissions to override rules on content. But even if some rules may break in some cases, that's just an instance of 'use with caution'. We can't really prevent users from making mistakes and we shouldn't try to overprotect because that just put unnecessary constraints on what can be done with the system. smile

In reply to Itamar Tzadok

Re: Restore of anonymized backup

by Dan Poltawski -
Well, I think you are minterpreting what I was suggesting, i'm not suggesting it does that to 'protect our users' but rather to enforce the relational integrity of Moodle data on a technical level.
In reply to Dan Poltawski

Re: Restore of anonymized backup

by Itamar Tzadok -

I'm not misinterpreting, Dan.

The scenario I propose poses no problems to the relational integrity of Moodle data on any level. If anything then the auto creation of new anonymous users breaks the rational integrity of Moodle data on the user level. So what you suggest does not really addresses the issue.

The scenario I propose simply means that under certain conditions, content own by one user in the source Moodle server is assigned to an existing equivalent user in the target Moodle server, rather than to a new meaningless user. If the conditions are not met the restore may be denied.

Like everything else, this can be worked around. But it is a missed opportunity for code/functionality reuse. smile

In reply to Itamar Tzadok

Re: Restore of anonymized backup

by Itamar Tzadok -

And so it is worked around by assigning restored activity data to the restorer and deleting from mdl_user all anon users. smile

In reply to Itamar Tzadok

Re: Restore of anonymized backup

by Dan Poltawski -
Sorry Itamar, i'm afraid I don't think i'm following any more..

If you think there is a problem with the way that we are dealing with anonymised backups then please do create an issue for it explaining.