PHP-Database-Moodledata on different servers. How to upgrade?

PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -
Number of replies: 15

Hello

I have 4 servers and want to use the new release of moodle. I am using 3.3.4. I don't want to move data folder or migrate database because they are huge and they will be continued to use on new release of moodle.

How can I do that? 

Is just install new moodle server and change it's database and data folder to old ones works for me?

or what you suggest

Could you show me a way please?

1. HaProxy

2. Moodle Web

3. Database (DB is about 40 GB)

4. NFS server Moodle Data (data is about 6 TB)



Average of ratings: -
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Do you want to upgrade or do you want to migrate? There's no need to install a new Moodle server. Just update the Moodle code on the web server.

(Take a backup first, of course)
In reply to Howard Miller

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -

Actually I want to migrate. 

I want to leave old web server behind me.

But I want to use same db and moodledata server 

In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you're asking the question... I wouldn't do this in a single step. Upgrade and then migrate or migrate and then upgrade. Have a working Moodle in between each step.
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
If I understand you correctly, the new server will be just a web server. It will send the database requests to the old server. Also the moodledata directory will be the old moodledata mounted through the network. You might escape with the former, if both servers are in the network of your provider, but the latter is a bad idea. Moodle performance is sensitive to its moodledata directory.

That said, your automatic course backups can be sent straight to a network drive, no problems there.
In reply to Visvanath Ratnaweera

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -

I have all servers in my datacenter.

At the beginnning DB-moodledata and web were in same server. Because of performance issues I have exported DB and installed a db server. I was have 2 servers (one DB, one moodledata and web ) after a while a have problem with disk size it was 4 tb but there were lots ot videos and it was growing 100-200 gb per day. So I have installed a NFS server and moved moodledata to this server. I have about 7-8k lessons on it and 40k students.

For make cluster I have installed haproxy but I do not need the second web. Proxy is active if I activate second web server it is running fine.

And today, My first moodle server vmdk is growed up to 4-5 tb it just 30-40 gb but vmdk is huge and moodle versin is old. So I just want to install new fresh moodle but I want to use my own database and moodledata folder. They are not going to change, I just want to change web server.

Sorry for my English I hope ı could tell.

In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> growing 100-200 gb per day

Are you sure that this is genuine usage? Not something malfunctioning?

I remember a couple of discussions in the Hardware and performance forum about moodledata growing uncontrollably because something went wrong. You might want to run the Forum advance search selecting that forum.
In reply to Visvanath Ratnaweera

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -
It is OK
There were exams and 40k students were uploading their videos. When time is up growing stopped.
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
From 3.3 you can go straight to 3.8 but not to 3.9. You can see the possible upgrade paths in http://www.syndrega.ch/blog/#php-and-dbms-compatibility-of-major-moodle-releases.

Moodle upgrade goes like this https://docs.moodle.org/en/Upgrading. Many things can go wrong and there is no downgrade button. See https://docs.moodle.org/en/Upgrading#Before_upgrading.

Which also means that you should not be in a position where you can't make a https://docs.moodle.org/en/Site_backup.
Average of ratings: Useful (1)
In reply to Visvanath Ratnaweera

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Usman Asar -
Picture of Plugin developers Picture of Testers
Visvanath, can you please include this URL in your profile, yesterday I was looking for it and landed on your other site smile
In reply to Usman Asar

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Landed on my other side? Better not. smile

Yep, it coule be the standard signature. Since sigs are not allowed on moodle.org, put it on my profile.
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Usman Asar -
Picture of Plugin developers Picture of Testers
Sukru,

that 6TB will definitely be based upon, years of repeated automated backups - adjust your automatic backups and keep 1 copy - give a few days before moodle deletes older copies overtime, you'll likely be left with 1/4th of that size

rest for database, go into database and sort tables by size, on top most probably will be standard log, just empty that database and again you'll be left with much smaller size.
In reply to Usman Asar

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -
Hello Usman
I am not using backup.
Because of Covid-19 all students having lessons in moodle.
It is about 7k lessons and 40k students, .doc, .xml, .pfd, .pptx and lots of video files mp4 etc.
I do not complain about large size. I just want to install a new moodle web server and I want tou use same moodledata and database server.
My question is how should these steps be?
Sincerely
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Usman Asar -
Picture of Plugin developers Picture of Testers
Sukru, I dont see any issue, other than making a backup copy of moodledata and database before installation (a recommended step before major installation)
rest process is straight forward.
just replace your moodle folder with new one (make a copy of moodle folder as well) and your installation will start.

here's what I would have done it:
1. making backup copies of all three (moodledata, database and moodle folder)
2. check for my PHP and database versions if they are compatible with newer moodle, if not then try upgrading to a version that is mutually compatible (refer to Visvanath's manual)
3. make list of all additional plug-ins and match their version numbers compatible with new moodle, although its not crucial as moodle detects and recommends downloading newer versions of plug-ins after install too.
4. put site in maintenance mood, add upgrade key to your config.php file so no one accidentally triggers upgrade process and/or get crucual details about your server.
5. after successful upgrade, keep backups for a day at least, test everything meanwhile for working then you can get rid of them easy.

if you're starting webserver as a brand new box, then setup hardware and move current moodle there to see web server's working first, before starting an upgrade.
In reply to Usman Asar

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Sukru Ozdemir -
So first of all i need to upgrade correctly.
I want to user new web server. I want to make a clean install.
Could you please tell me about this steps after a successfully upgrade.
I am going to install hardware but should I need to install moodle on it and show the database and moodledata folders or just copy php files from old server to new server?
Sincerely
In reply to Sukru Ozdemir

Re: PHP-Database-Moodledata on different servers. How to upgrade?

by Santosh Nagargoje -
did you get performance issue with NFS server for Moodledata...