I feel like this must have been discussed before, forgive me if I missed it, but I couldn't find anything exactly as I'd like. We want to have two Moodle instances, one production which our real users access and one development for only our instructional designer, various testers, and sys admin. Development should faithfully recreate production to an extent but cannot fully mirror it (we don't want to duplicate all the files due to storage concerns, some configuration settings must differ e.g. all references to the server URL). I am fairly sure a direct database sync is ruled out for those reasons.
I love moosh and was hoping to use it for this purpose. The config sync does not have to run on a regular basis as long as I can do it manually when needed. Does this approach seem fruitful?
- `moosh config-get` on production to get the complete list of Moodle settings
- perhaps `moosh config-get <plugin>` for every additional plugin? Without some testing I don't know if this is necessary
- `sed` commands to edit the few settings that necessarily differ & process the output into something iterable for below
- iterate over each setting on development and `moosh config-set`
If this sounds inadequate, what are others doing? Surely, we are not the only institution with a dev/prod setup. I mostly ask because this seems like something moosh should do out of the box yet, in reading the commands, I didn't see an easy way to do #4 (take something like the output of config-get and pipe it to config-set). If I could `moosh config-get | sed | moosh config-set` that'd be ideal.