Basic Update Prob

Basic Update Prob

Steve Pelham -
回帖数:3

Hi,


the Moodle of our domain (Moodle 3.9) we'd like to upgrade...

so I rebuild all the source code locally on "http://localhost:8082/moodle". Now I populated the 
the local rebuild with a database dump of our domain. For that purpose I replaced the domain of
our productive domain in the net with "localhost:8082/moodle".

When I log in with my user on the productive site I can see all administration settings like so:

admin prod
When I log to the local rebuild I only see a limited view for the administration settings like so:

locwer

So there tabs missing ...

http://localhost:8082/moodle/admin/category.php?cagtegory=themes is displayed as:

localadmin


According to the database my user (id=5) is site-admin:

select * from mdl_config where name='siteadmins';

+----+------------+-----------------------------+
| id | name       | value                       |
+----+------------+-----------------------------+
| 23 | siteadmins | 1,2,3,4,5,6,7,8,9           |
+----+------------+-----------------------------+


Can you teach me , how to get the full view locally ?

Thanks for your help!

Best,

Steve

回复Steve Pelham

Re: Basic Update Prob

Bret Miller -
Particularly helpful Moodlers的头像
This isn't really a developer question. Cloning a Moodle website is more complicated than copying the files and changing the URL in config.php.
 
  • Copy the website files to your local website directory
  • Copy the Moodle data files to your local moodledata directory
  • Copy the database to your local database
  • Use the command-line tool to replace the URL:
    $PHP admin/tool/replace/cli/replace.php --shorten --non-interactive --search=$fromurl --replace=$tourl
  • Use the command-line tool to replace the Moodle html directory
    $PHP admin/tool/replace/cli/replace.php --shorten --non-interactive --search=/var/www/moodlehtml --replace=/var/www/localhtml
  • Use the command-line tool to replace the moodledata directory
    $PHP admin/tool/replace/cli/replace.php --shorten --non-interactive --search=$fromfiles --replace=$tofiles
  • Use the command-line tool to replace the Moodle database
    $PHP admin/tool/replace/cli/replace.php --shorten --non-interactive --search=$fromdb --replace=$todb

Note that $PHP here is set to the path of the maximum version of PHP allowed for the version of Moodle installed. Technically, you may not need all the replaces. It depends on what plugins you use and what data they keep in the database.

回复Steve Pelham

Re: Migrating a prod. site to a local Docker environment

Visvanath Ratnaweera -
Particularly helpful Moodlers的头像 Translators的头像
Search_and_replace_tool could be the key. Otherwise the instructions on migrating a Moodle site in LAMP is documented in Moodle migration; note the item 1.8 Moodle_migration#Update_links_containing_wwwroot_in_the_database. You need to translate all that in to your Moodle in docker environent.

P.S. Yeah, a "Basic Update Prob" belongs to the Installing and upgrading forum. I propose a new subject line, "Re: Migrating a prod. site to a local Docker environment".