Server migration, moodle update (no images)

Server migration, moodle update (no images)

by Jura Plachy -
Number of replies: 9

Hi,

I have problem with migration and upgrade moodle from 3.6 to 3.9+. I followed the official instructions, and after migration all existing courses and users are working, but in all courses I have same problem broken images.  (I can upload new images and are working, URL remained the same as on the old server.)

Can anyone give me advice?

Thx



Average of ratings: -
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You've migrated and upgraded in one shot? That is something I avoid. If it goes wrong, you don't know which one broke.

Is the debugging level really at DEVELOPER level? A random guess: Does the web server has real privileges in the whole Moodle code directory and its sub-directories?
In reply to Visvanath Ratnaweera

Re: Server migration, moodle update (no images)

by Jura Plachy -
You're right it was in one shot. It looks that upgrade was successful, but is something wrong with the migration. And debugging is on DEVELOPER: extra ...   Privileges shoud be correct (IUSR and Network Service). 

Some images are working for example (/pluginfile.php/360/course/section/127/fish1%20%281%29.jpg)
not working (pluginfile.php/571/mod_page/content/2/Ledňáček%20říční_2.jpg)
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Well, if some uploaded files are being found, there is no reason why others are not found - unless your copying of moodledata was incomplete.

Now I see that the "lost" file has special characters in its name. There is a possibility that the two database servers (MySQL/MariaDB) support different character sets - or the database dump was damaged due to something in the Windows system. I don't discuss Microsoft, hope somebody else will come to help.
In reply to Visvanath Ratnaweera

Re: Server migration, moodle update (no images)

by Jura Plachy -
I have try to migrate only old version of moodle with db and moodle data to new server (without upgrade) now. And problem still persists. So how I said problem is in migration. Old moodle was running on Xampp package but new moodle on new server is running on IIS, can be that problem? But MariaDB is still same (only updated).
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Ken Task -
Picture of Particularly helpful Moodlers

What's size of moodledata/filedir/

I recently did a migration ... not upgrade at same time ... and was glad it was on Linux.  moodledata/filedir about 80% of 2TB attached storage device.  Had to run rsync twice ... last time with nohup to assure it finished before my ssh session timed out.

Can Windows run rsync?

'SoS', Ken


Average of ratings: Useful (1)
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Jura Plachy -
OK guys, we found the problem. On old server the way is right with czech diacritics symbols working -> (pluginfile.php/571/mod_page/content/2/Ledňáček%20říční_2.jpg) same way on new server, but image doesnt work. I tried to find some images with no czech symbols and these images works fine. Next I found that when I turn on Maintenance mode on old server, images also stop working. I tried to backup without Maintenance mode but with same error after backup restore.

Both servers has MariaDB with utf8mb4_unicode_ci

Filedir has 5Gb.

Any idea?
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Ken Task -
Picture of Particularly helpful Moodlers

In new server, do you have czech language pack installed?

Try that and see if links work.

Recently had similar issues with a course in Spanish ... 3 Spanish languages installed and it still didn't fix - me 'no habla' [Spanish spelling??] .... soooooooo.   Had to resort to Webmin's MySQL tool and browsed mdl_files table for filename looking for filenames with Spanish characters in them.   Edited each filename and change things like 'nina n' to a 'plain jane english' 'n'.   Didn't have many files so took about 40 minutes but ... file links worked.

Granted the Spanish teacher might object, but ... actually may never notice ... uhhh ... as long as it works, right? :|

'SoS', Ken

Average of ratings: Useful (2)
In reply to Ken Task

Re: Server migration, moodle update (no images)

by Jura Plachy -
It's unbelievable, but you were right. As soon as we have installed the Czech lang, everything works fine.

Thank you very much for the advice.
In reply to Jura Plachy

Re: Server migration, moodle update (no images)

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome! .... but 'unbelievable' ... servers/code/etc are just dumb machines programmed to do whatever ... it's take a human to really foul them up! smile  [thus not a fan of AI].

'SoS', Ken