Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6586

Re: Migrating a course manually without mbz moodle backup

$
0
0
by Ken Task.  

No, don't wipe out moodledata!!!  That will not work.  Moodle wouldn't 'rebuild' it.  Now that it's there, there are DB records that reference files in filedir.   At this point it calls for 'finer surgery' - maybe even 'trickery'. Sorry, no magic command or bullet will do.

Do you re-call using an image in a quiz question?  or a link to an upload video/other file?

When it reports that error (assuming you have debug turned on so you can see specifics), does it also report what file?  It might show a long name like (this is an example): c7eed145d6501f66d716525a116527d93f3adbda

One can find that file in filedir.  moodledata/filedir/c7/ee/

If it exist, there will be a file by that same name in the directory path shown above:

c7eed145d6501f66d716525a116527d93f3adbda

Using command line:

file -b c7eed145d6501f66d716525a116527d93f3adbda

Should show file information ... type of file (png, etc.)

IF the file does NOT exist, one possible way around such issues ... manually create a file (using the same folder structure) that really contains nothing in it.  Following the example given ...

Again from command line:

cd moodledata/filedir/c7/ee/

IF c7 doesn't exist, create it and manually set permissions/ownership.

That means ee doesn't exist either ... ditto on permissions/ownership.

while in filedir/c7/ee/

touch c7eed145d6501f66d716525a116527d93f3adbda

Above command creates a file by that name but it contains no data.

chown www-data:www-data c7eed145d6501f66d716525a116527d93f3adbda

When you run the cron job from command line:

cd moodlecode/admin/cli/

php cron.php

Does it empty the trashdir?

ls -l /moodledata/trashdir/

Now that you have a 'file' in place Moodle should find something, even if it contains nothing.  Run the backup and see what happens! ;)  Can't be any worse than what it is right now - and, we actually might be successful in giving Moodle what it's wanting to get by this error and backup.

NOTE: there still would be some repair work to be done in that quiz, I would imagine.

'spirit of sharing', Ken


Viewing all articles
Browse latest Browse all 6586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>