I have Raspberrypi 3b+ with moodlebox 3.9.0 img. This version has an issue of a maximum 6 wifi device can connect to it. I want to update moodlebox to latest version 3.11.0.
I used the official charger for raspberry pi.
Upgrade the MoodleBox with all your contents
TL;DR: backup your Moodle courses, install a new image and restore the courses.
Normally, what @Ratna said is correct. Unfortunately, for the WiFi issue, it's not so easy, since the current images uses a nasty hack to install older RPi WiFi drivers that restore the capability to support more devices.
If you can read the code, you could try (without messing) to replace the drivers on you MoodleBox and do the operations in the page cited by Ratna above. Do this at your own risks: it's not an easy task. See the code here: https://github.com/moodlebox/moodlebox/pull/196 and some explanations here: https://github.com/moodlebox/moodlebox/issues/195.
In any case: good luck!
punekaramit4
I think that you want to get more wifi devices connected to your MoodleBox. For this idea it does not help to update the Raspberry Pi OS because Nicolas installed an old wifi driver to get this feature back.
If your old MoodleBox has no content you want to use in your new MoodleBox then it's easy. To get the software image 3.11.0 on your MoodleBox you need to download and install the new image. If you use the same micro sd to install the new software image then all content of your old MoodleBox will be lost. https://moodlebox.net/en/help/install-the-moodlebox/
If your old MoodleBox provides a few courses you want to keep on your new MoodleBox then you must backup these courses and download them to your pc or other device. After the installation of the software image 3.11.0 you must restore your courses back into your MoodleBox. https://moodlebox.net/en/help/copy-moodle-course/
If your old MoodleBox is installed with some additional plugins which are used in some courses and activities then you must install these plugins before you restore the courses. If you do not install the plugins then all instances of the plugins get lost.
If your old MoodleBox is configurated with a lot of users, with individual settings and some additional plugins then it could be better to save the database and the folders moodle and moodledata. But this operation will be very difficult if you do not know how to install Moodle on a server. https://docs.moodle.org/311/en/Moodle_migration
Best regards, Ralf
- Edited
I just migrated my MoodleBox up to 3.12.0.
I saved the database and the folders moodle and moodledata from my old MoodleBox ... 50 users, 8 courses, 58 additional plugins, and a lot of content for my teachers workshops. I copied the new MoodleBox image to a new microSD card and put it into my Raspberry Pi 4B. The MoodleBox 3.12.0 started up as an empty Moodle as Nicolas configured it. But I wanted to get all my settings, all my users, all courses, all plugins, and all my content.
I deleted all tables in the database and imported the database backup moodle.sql.gz using the Adminer tool. I deleted the folders moodle and moodledata. I restored the folders moodle and moodledata from my backup. I rebooted the MoodleBox and my old MoodleBox was migrated to the new MoodleBox 3.12.0.
Yes, I added the 5th anniversary image manually into a new text block because this block and its content was lost when I deleted the database and the moodledata for the migration of the old MoodleBox. Yes, I also must edited the first summary block to set the new version and date.
Ralf
In another thread https://discuss.moodlebox.net/d/280-perte-dacces-apres-passage-en-https/9 I just saw that I need to save the config.php. In the past upgrade sessions for my extended MoodleBox I always took the old config.php but during some releases the config.php changed a little bit.
So it would be a good idea to take the latest config.php also for my upgrade process.
ralfkrause Greetings - I know it is an old discussion but I am wanting to migrate to the 4.2 version. When I follow your steps and try to import the database to the new site, adminer tells me that the database already exists and it does not give an overwrite option. Further, when I try to access the old database I am denied permission (even using the default login and password. Any idea how I can overcome this?
Ian
Hi, it‘s no problem for me to answer in a rather old thread. :-)
You need to talk the directory moodle and the directory moodledata from the old MoodleBox to the new one.
sudo su
cd /var/www/
tar czf moodle-moodlebox.tgz moodle
tar czf moodledata-moodlebox.tgz moodledata
Now you can take a program for sftp to download both files to your computer. I am using the program FileZilla for this. Then you need to export the database moodle using adminer.php. Export the database and set "write to file" and gzip. The file moodle.sql.gzip will be downloaded to your computer.
Take a new microSD card for your MoodleBox so the old one will be unchanged until the migration result is okay.
Now you must start the Raspberry Pi with the new card. With the adminer.php you must open the database moodle and delete all tables. Don‘t delete the database itself. When the database is empty you can import the database from the file moodle.sql.gzip on your computer.
Now you must rebuild the exported directories moodle and moodledata. Upload both files moodle-moodlebox.tgz and moodledata-moodlebox.tgz to the user home directory. Now you need to open the terminal.
sudo su
cd /var/www/
cp /home/moodlebox/moodle-moodlebox.tgz .
cp /home/moodlebox/moodledata-moodlebox.tgz .
mv moodle moodle-420
mv moodledata moodledata-420
tar xzf moodle-moodlebox.tgz
tar xzf moodledata-moodlebox.tgz
You will get the two new directories from your old MoodleBox. The owner, the group and the rights of both directories should be correct. Now you are ready to restart the new MoodleBox with the content and all plugins from the old MoodleBox.
Try to restart! I hope it will run without any problem.
Ralf
Ian Taking the Moodle site from one MoodleBox to another is a Moodle migration. Here is the official documentation https://docs.moodle.org/311/en/Moodle_migration.
Hi Ian,
The owner, the group and the rights of both directories should be correct. If your old MoodleBox is older than MoodleBox 3.6.0 you must change the owner and the group. The directories must have the same owner, the same group and the same rights as the saved directories moodle-420 and moodledata-420.
sudo su
cd /var/www/
chown -R www-data:moodlebox moodle
chown -R www-data:moodlebox moodledata
The Moodle version is now the old Moodle on the new MoodleBox. To update the Moodle to the latest version please read https://moodlebox.net/en/help/moodle-version-update/. In my own tests I found that the config.php changed in a rather old MoodleBox. If the config.php is different from the old MoodleBox please take the one from the new MoodleBox. You will find it in the directory moodle-420.
If everything runs fine you can delete the directories moodle-420 and moodledata-420.
… and if something went wrong you can start again. Your old microSD card should still be there. ;-)
I hope you will get it and everything works fine.
Ralf
ralfkrause Thank you so much - migrated successfully - saved many man-hours
ralfkrause Greetings. I am trying to update to the 4.5 image. It writes ok and works as a basic image. When I try to do the upgrade from previous image as discussed in this thread, I get stuck on importing the old moodle.sql.gz into the new. I have deleted the tables etc but it seems to get stuck at this point. I have tried it multiple times and can't seem to get past this point. Screenshot attached - it just stays on this screen no matter how long I leave it
Any help would be appreciated.
- Edited
Ian I just upgraded my MoodleBox from 4.4.0 to 4.5.0.
For the database import I tested different ways for you. Really the easiest way is the adminer.php. If the database sql file is smaller than 50 MB (mine has 12 MB) then you can upload it on the import page and execute it. If your database sql file is bigger than 50 MB you can rename it to adminer.sql[.gz] and move it into the moodle folder ... near the adminer.php ... and after you've done this you click on the 'Run file' button on the right side.
If you adminer.php does not look fine you can get a new php file from https://www.adminer.org/ ... yes, it's only one php file which is administrating the databases. Perhaps your file is damaged. I can't say if you set the owner of the folders moodle and moodledata correctly to www-data.moodlebox.
Ian Can you please tell us which version is your adminer.php.
You upgraded on March 11th, 2022, and perhaps you took a very old adminer.php together with your moodle folder. The current adminer.php has is Adminer 4.8.1. Perhaps you have an old one which does not work with PHP 7.4 or MariaDB 10.5.15.
I hope we will find the reason for you problem.
Ralf
ralfkrause Thanks for the guidance Ralf
I have been out of office for a few days and will try this out on Monday.
Appreciate the response