[Moodle 2.9.2] Moving from Windows to Linux Server

[Moodle 2.9.2] Moving from Windows to Linux Server

by Hugh Edwards -
Number of replies: 15

Hello Everyone. 


I have a tech question for everyone if that's ok. We have a current installation with Windows server 2012 and for various reasons we want to move lock-stock to a brand new Linux server. Our moodle installation has 30k users and around 40 scorm courses. So I have a couple of questions about that.....

1. Does the internal file-system in Moodle have relative paths for it's course videos, documents, downloadables etc, or are they absolute paths, i.e., if I pick up and move the filestructure from one server to another, will all the courses still work?

2. Can anyone point me to a guide anywhere (or give me any advice) for moving an existing installation on windows to a new installation on Linux? Luckily our MySQL database is on a separate server which we can just re-point to later....so my plan was to install Moodle on the linux server and point it to the existing database and hopefully have it just work!!! Any advice?


Thanks all. 


Hugh. 

Average of ratings: -
In reply to Hugh Edwards

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Good idea!

1. Not unless you added them.  Chances are it will "just work".  If the resulting URL differs then there is a script built in to fix up those links. 

2. Moodle_migration. However, your plan should work fine. What about the 'moodledata' files area. You need to move that remember. 

Average of ratings: Useful (1)
In reply to Hugh Edwards

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Darren O'Neill -

Hi Hugh,

I did a similar migration not so long ago. All worked fine for me. The moodle DB and web sever were all on the one box. So I just exported the DB and imported it onto the Linux server. I  then copied the Moodle folder onto the Linux server and took the moodledata folder as well.

I then  made sure that all paths were correct in the config.php. All seemed to work fine.

I can't see there been any issue but if you run into anything drop a comment below and if I can help I will!

Best,

Darren 

In reply to Hugh Edwards

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by A. Obeid -

Don't forgot to backup your database! Or best clone itsmile 

In reply to Hugh Edwards

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi

You are lucky since you has MySQL also on the Windows side. So the "Moodle migration" should proceed as prescribed: https://docs.moodle.org/29/en/Moodle_migration.

P.S. Unless you plan to burn the Windows server immediately, the back-up is not urgent. You can take your own time testing the new Moodle instance!
smile
In reply to Visvanath Ratnaweera

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by ben reynolds -

Where we got burned was in filenames. Windows File Name.doc is not friendly to Linux. Linux likes WindowsFileName.doc

three of us here spent 2+ years correcting the names of a huge number of audio and image files to go into a huge number of quiz questions.

Test first!

Average of ratings: Useful (1)
In reply to ben reynolds

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> Windows File Name.doc is not friendly to Linux.

Absurd! May be to Linux, but Moodle can handle _any_ unicode character in file names. Read "(Moodle 2.1.2) Problem with Unziping zip files that contain special characters" https://moodle.org/mod/forum/discuss.php?d=190958. (Well, I am quoting others. So testing never hurts, or hurts less than without. ;)
In reply to Visvanath Ratnaweera

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by ben reynolds -

All I can say is that the audio and image files failed when we moved to a Linux server and Moodle 2+ (from Windows and 1.9+). They worked when we changed file names to CamelCaseWithNoSpaces.

In reply to ben reynolds

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Ben

I know, theory and practice are different. The file name mess you had sounds terrible and you are for sure not keen on reproducing it!
wink

Still for out understanding: There are two things here:
1. "we moved to a Linux server and Moodle 2+ (from Windows and 1.9+)"

So _two_ things happened. Confirms a simple rule in system administration: "One step at a time."

Out of the two, I'll bet Moodle version jump was the culprit. Pity that you didn't say what 2+ in your case means. I remember 1.9 to 2.0 was a killer. Only in during late 2.2 the transition become bearable.

2. "Windows File Name.doc is not friendly to Linux. Linux likes WindowsFileName.doc"
That is for the illiterate who haven't seen anything other than "My Computer". Those who want their work to be usable in many computer platforms use safe file names. (Aren't the same happens when we travel, imaging me expecting the world to call me by my සිංහල name!)

That is why I suggested POSIX file names in the thread I have given earlier (and almost earned the title of a Troll).
In reply to ben reynolds

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Really? Where was that?

Moodle stores filenames as hashes... the filename is only stored in the database. So, either this was a very long time ago or you are not talking about Moodle files as such. 

In reply to Howard Miller

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I suspect the clue is where Ben says "from Windows and 1.9+". Moodle < 2.0 did not used the hashed file name arrangement. I suspect case sensitivity as well as spaces could have been a problem too.

In theory there is no difference between theory and practice, but in practice there is.

In reply to Marcus Green

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

It did not indeed... I am just about old enough to remember tongueout

In reply to Howard Miller

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by ben reynolds -

I keep forgetting the important part. These are all legacy files. That's probably the source of our problem. 500+ quiz questions and at least one image or audio file per question.

Average of ratings: Useful (1)
In reply to Marcus Green

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by ben reynolds -

We had everything you can name. Caps, spaces, hyphens -- everything it is possible to put in a Windows file name, I am ashamed to say.

In reply to ben reynolds

Re: [Moodle 2.9.2] Moving from Windows to Linux Server

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Ben

Caps and hyphens are safe - if hyphen is not the first character. The problems start with the special characters (in the 7-bit set) like Space # egg ! ~ @ % & * = + [ ] , < > | : ; ' " https://en.wikipedia.org/wiki/ASCII#Printable_characters and continues in to 8-bit sets Ä ä Ö ö Ü ü https://en.wikipedia.org/wiki/Extended_ASCII not to mention all kinds of UTF coding.

The document on POSIX file names I was referring to in the thread I've mentioned previously, https://en.wikipedia.org/wiki/Filename#Comparison_of_filename_limitations, it gives A–Z a–z 0–9 . _ - as the safe set.with the limitation "hyphen must not be first character". (I know, it also says 14 characters, but that limit has been extended to 255 a long time ago.)

P.S. You still didn't say what 2+ means in your "1.9 > 2+" migration. Also interesting to know how (and why) you ended up with legacy files. May be there was a discussion on moodle.org.