"My Private Files" backup & restore

"My Private Files" backup & restore

by Philippe Decloitre -
Number of replies: 6

Bonjour everyone,

I am working towards this _seemingliy simple task_ backing up from my office computer Moodle 2.3+ and restoring to production Moodle. Much of my activities are linked to "My Private Files" folder

I have tried using simple things such as LABELS with roll-overs images for testing.

Interestingly, once the restore is completed, the links to the images are there and ready to work. It's the images that are not. They are nowhere to be found, the "My Private Files" folder is empty. (by the way,I would like to commend here the extraordinay job of the developpers who made it possible for the links the be there, in working order.)

I recently, not seeing the images, tried to edit one of my test labels. Upon opening it, this triggered some kind of "refresh" action, and the images suddenly appreared. However, they ARE NOT in the "My Private Files" folder. They have been stored "within" the label, which make the whole scheme of aliasing useless (no en-mass updating of the course).

Does someone know what is preventing those files from being copied to the "My Private Files" folder?

Merci beaucoup smile

 

Average of ratings: -
In reply to Philippe Decloitre

Re: "My Private Files" backup & restore

by Philippe Decloitre -

This is not an anwser but a continuation...

I just stumbled on a very intesresting page (here) where I learned that what I took for NORMAL links were really transient links, that lead nowhere. No wonder backup does not work. It won't until the links include "pluginfile.php" instead of "draft" (that draft did look a bit suspicious..).

So to date we have:

No "true" link backup

No MyPrvFiles folder backup.

Am I right?

Thanks

In reply to Philippe Decloitre

Re: "My Private Files" backup & restore

by Luis de la Torre -

I would be glad if someone could confirm this.

Im desperately looking for the option to backup users private files but it just doesn't seem to exist.

In reply to Philippe Decloitre

Re: "My Private Files" backup & restore

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators

That's right. As is documented at Restoring file aliases docs page, Moodle does not support restoring links to private files at another site. And adding support for it is not easy at all. It would need to handle user mapping, eventual collisions (same file already existing) and other things.

Average of ratings: Useful (1)
In reply to David Mudrák

Re: "My Private Files" backup & restore

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Ah Philippe -just come to apologise as I got your message the other day but only got round to giving a reply tonight only to find you've got a reply heresmile Probably not the reply you wanted though..

In reply to Mary Cooch

Re: "My Private Files" backup & restore

by Philippe Decloitre -

Bonjour Mary, and everyone;

Merci pour votre sympatique réponse smile

I am not sure the discussion is complete though...

Helen very rightly refers to this documentation, which I also refered to here.

The flowchart goes like this (I numbered the steps to make reference easier):

1 Start restore MBZ
2 Is it an alias ?
-YES
3 Stash if for later
4 Next file
5 Iterate over all stashed aliases
6 Same site?
-NO
7 Alias to Server files or Legacy course files?
-YES
8 Is there such repository instance available?
-YES (in all my test it was the case)
9 Use the repository instance
10 Alias to Server files or Legacy course files
-YES (!? Hadn’t we got that at step 7 already, or is it different?)
11: Reference files also included in backup? _is it ever possible to have a YES answer to this question, I have never seen my “Private files” or “Legacy files” in the “Private” or “Legacy” folder of the Moodle where I performed the restoring_ Is not that possible? Will it at some point? What if I upload the folder manually, would Moodle be able to catch up? (at this stage, it can’t, I tried)
12: Restore the alias so that it refers to the file in the backup

 

So it seems backing up aliases is really possible IF step 11 is fullfilled. My questions are:

"Is this retoring of private (server?) files _or Legacy files_ possible and how?

"Are the aliases to the files strored in the backup in their transient state (draft) of permanent (pluginfile)?

I understand these are programmer's answers unless there is some (hard to find) parameter that needs ticking, and our special attention smile

Thanks again/Merci beaucoup smile

Philippe