Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 46946

Re: Trying to repair an incomplete migration

$
0
0
by Ken Task.  

Haven't been in same situation to be able to help with specific suggestions ... this one, however, I think I can respond to:

'If I upgrade the site as is, will the upgrade recreate the necessary folder structure and files that are missing from my Moodledata folder (I think it should)?'

The upgrade involves only the code.  How could an upgrade possibly re-construct a file it doesn't have other than the information about files referenced in the DB?   The DB mdl_files table is really only the metadata - ie, the data about data (or in this case files).   Wouldn't worry about sessions information ... that, IMHO, is the least of concern.

As far as finding an old version of filedir in the old moodledata and reloading that ... don't think that will work.   Files in filedir are actually named with a content hash that's generated from code such that each is unique and recorded in the DB.   Load old filedir into moodledata the current DB will gain nothing ... and probably make things worse.

Does the filedir have backups of the courses in it?

select * from `mdl_files` where `component` like "backup"

Note the contenthash in the above.

example: 34bcc4bcc4bba8ee2f068e5f748d861ea60feebb

cd moodledata/filedir/34/bc/

file -b 34bcc4bcc4bba8ee2f068e5f748d861ea60feebb

will show

Zip archive data, at least v2.0 to extract

It's a backup ...

mv 34bcc4bcc4bba8ee2f068e5f748d861ea60feebb /to/some/test/directory

cd /to/some/test/directory

mv 34bcc4bcc4bba8ee2f068e5f748d861ea60feebb somebackup.zip

unzip somebackup.zip

The moodle_backup.xml file will contain info about the course.   course_files.xml will have info on the files contained in the course.

If it looks like you could use the backup, change somebackup.zip to somebackup.mbz and use that file to restore.

'spirit of sharing', Ken


Viewing all articles
Browse latest Browse all 46946

Trending Articles



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