Comments (14)
I realize that Moodle folder installation reside at /opt, and /opt is not a part volume on the docker compose.
The directory that is persisted and where the data is recovered is /bitnami/moodle/
. As you can check by running:
$ ls /bitnami/moodle/
config.php moodledata
The configuration file and the Moodle data directory are the only ones persisted.
If you take a look to the file /opt/bitnami/moodle/config.php
:
...
$CFG->dataroot = '/bitnami/moodle/moodledata';
...
You can check that it's taken the data from the persisted directory. On the other hand, the file /opt/bitnami/moodle/config.php
is just a symbolic link to /bitnami/moodle/config.php
.
At this moment, the plugins and themes are not automatically recovered from the persistence directory (when deploying docker-compose up
). If you want to persist them, you can extract the content at /bitnami/moodle/
and then substitute the /themes
folder at /opt/bitnami/moodle/...
with a symbolic link as the config.php
is.
from bitnami-docker-moodle.
ok, I already try your suggestion to extract /themes
folder for backup the theme and add that folder as a volume when re-init moodle in other instance. and so far it's work. thanks for the help. :)
and what about the plugin, (e.g I install old plugin google analytics) can I do something also to backup the plugin including the configuration? so my moodle will have completely persistent. :)
from bitnami-docker-moodle.
Hi @kahidna
As the same applies with the plugins directories (info here with all the folders that may contain plugins). I've opened an internal task to discuss what can we automate from this to avoid future workarounds.
Note that if you follow this workaround and you backup the themes and plugins, if you launch a new container which uses the persisted data, you will only have to make the symbolic links to those folders while we include them in the container.
I'm sorry for all the inconveniences that this may cause.
from bitnami-docker-moodle.
any updates to the docker image/configuration to address this, not being able to persist the themes and plugins makes this docker implementation on valid for the mostbasic of uses or for simple demo purposes.
from bitnami-docker-moodle.
I am afraid this issue hasn't been addressed yet @burkeallen ! I will update the associated task to see if we can its priority up. Thanks for your consideration.
from bitnami-docker-moodle.
Hello @burkeallen, @kahidna
Since Bitnami Moodle Docker Image 3.4.0-r1 the whole installation directory is persisted so themes and plugins will remain after container restarts.
Please pull the latest version of the moodle container or use the specific tag:
$ docker pull bitnami/moodle:latest
$ docker pull bitnami/moodle:3.4.0-r1
Tomas
from bitnami-docker-moodle.
hi @tompizmor, I'm glad bitnami docker moodle's team release a new update.
I see there is update on Readme.md, especially on upgrade section
which said :
As an alternative, you can try upgrading using an updated docker image but any data from the Moodle container will be lost and you will have to reinstall all the plugins and themes you manually added.
so for upgrading moodle and keep the plugin and themes persistent, the only way is upgrading the application inside the container? and say I will migrate to the new server, I should backup the container (because if I pull a new image, mean I have to reinstall all the plugins and themes I manually added) also?
from bitnami-docker-moodle.
Hello @kahidna,
so for upgrading moodle and keep the plugin and themes persistent, the only way is upgrading the application inside the container?
Yes. The reason behind is that the Moodle application does not have a unique folder to store plugins and themes as you can see here. Therefore, there is no way to persist all those plugins directories and ensure that after upgrading Moodle using a new version of the docker image it actually contains all the new source code.
and say I will migrate to the new server, I should backup the container (because if I pull a new image, mean I have to reinstall all the plugins and themes I manually added) also?
Yes. If you want to migrate to a new server you should backup at least the volumes that contain the Moodle and MariaDB data and mount them in the same location that they were originally (/bitnami
). Also, it is important that you use the same Moodle version when restoring these volumes.
from bitnami-docker-moodle.
Since Bitnami Moodle Docker Image 3.4.0-r1 the whole installation directory is persisted so themes and plugins will remain after container restarts.
@tompizmor so the completely persistent moodle only work if I start the moodle service from the very beginning? its not working if I migrate from existing dockerized moodle?
from bitnami-docker-moodle.
@kahidna yes, I am afraid that you would need to start from a fresh Moodle 3.4.0-r1 and install your themes and plugins on top of it.
from bitnami-docker-moodle.
hi @tompizmor, I just testing backup my second moodle service and restore it on a different server. and it's working, plugin and theme completely backed up. Awesome!!
So for the upgrade just need to stop service, and then pull new image right?
from bitnami-docker-moodle.
Hi @kahidna,
So for the upgrade just need to stop service, and then pull new image right?
No. As you pointed out in this comment, the only way to upgrade the application and preserve themes and plugins is upgrading the application manually inside the container.
from bitnami-docker-moodle.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
from bitnami-docker-moodle.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
from bitnami-docker-moodle.
Related Issues (20)
- Container always return error code 1 in "Running database upgrade" stage HOT 1
- Debugging moodle container using PhPStorm HOT 4
- Languages can't install HOT 9
- Cannot remove '/bitnami/moodle': Device or resource busy HOT 3
- /opt/bitnami/php/tmp is not write-able HOT 3
- Moodle - AWS - Technical issue with ports HOT 3
- Upgrade to Moodle 4 HOT 2
- Order of scripts in Dockerfile keeps swapping between revision commits HOT 3
- Issue migrating to docker HOT 3
- Update mismatch HOT 4
- Successful upgrade but restart fail HOT 3
- failed to run moodle app with External database configuration of AWS RDS from kubernetes HOT 3
- CFG->wwwroot HOT 6
- Language not suported although locale exists HOT 2
- Cannot log into web interface under login HOT 3
- Scale out activity causes users to be logged out HOT 5
- env variables have a problem HOT 3
- moodle not showing icons in Admin panel HOT 3
- Issue migrating to docker HOT 3
- File upload failed HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bitnami-docker-moodle.