I used these Bitnami instructions to upgrade Moodle for my Caprover (Docker) system from V5.3.1 to 5.3.3.
This method has worked previously numerous times yet has now failed.
I get a loop when after it prints: Running database upgrade
2025-03-20T22:26:10.960122801Z moodle 22:26:10.95 INFO ==>
2025-03-20T22:26:10.966781094Z moodle 22:26:10.96 INFO ==> Welcome to the Bitnami moodle container
2025-03-20T22:26:10.967816489Z moodle 22:26:10.96 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers
2025-03-20T22:26:10.970035633Z moodle 22:26:10.96 INFO ==> Submit issues and feature requests at https://github.com/bitnami/containers/issues
2025-03-20T22:26:10.972668187Z moodle 22:26:10.97 INFO ==> Upgrade to Tanzu Application Catalog for production environments to access custom-configured and pre-packaged software components. Gain enhanced features, including Software Bill of Materials (SBOM), CVE scan result reports, and VEX documents. To learn more, visit https://bitnami.com/enterprise
2025-03-20T22:26:10.974745012Z moodle 22:26:10.97 INFO ==>
2025-03-20T22:26:10.976501193Z moodle 22:26:10.97 INFO ==> ** Starting Moodle setup **
2025-03-20T22:26:11.034881626Z moodle 22:26:11.03 INFO ==> Generating sample certificates
2025-03-20T22:26:12.251341980Z Certificate request self-signature ok
2025-03-20T22:26:12.251404657Z subject=CN = example.com
2025-03-20T22:26:12.289101535Z realpath: /bitnami/apache/conf: No such file or directory
2025-03-20T22:26:12.295185796Z moodle 22:26:12.29 INFO ==> Configuring Apache ServerTokens directive
2025-03-20T22:26:12.339340524Z moodle 22:26:12.33 INFO ==> Configuring PHP options
2025-03-20T22:26:12.353281581Z moodle 22:26:12.35 INFO ==> Setting PHP expose_php option
2025-03-20T22:26:12.369399719Z moodle 22:26:12.36 INFO ==> Setting PHP max_execution_time option
2025-03-20T22:26:12.383632076Z moodle 22:26:12.38 INFO ==> Setting PHP max_input_time option
2025-03-20T22:26:12.399288590Z moodle 22:26:12.39 INFO ==> Setting PHP max_input_vars option
2025-03-20T22:26:12.414325998Z moodle 22:26:12.41 INFO ==> Setting PHP memory_limit option
2025-03-20T22:26:12.426537146Z moodle 22:26:12.42 INFO ==> Setting PHP post_max_size option
2025-03-20T22:26:12.441931728Z moodle 22:26:12.44 INFO ==> Setting PHP upload_max_filesize option
2025-03-20T22:26:12.453815129Z moodle 22:26:12.45 INFO ==> Setting PHP output_buffering option
2025-03-20T22:26:12.486524258Z moodle 22:26:12.48 INFO ==> Validating settings in MYSQL_CLIENT_* env vars
2025-03-20T22:26:12.496130787Z moodle 22:26:12.49 INFO ==> Validating settings in POSTGRESQL_CLIENT_* env vars
2025-03-20T22:26:12.632631421Z moodle 22:26:12.63 INFO ==> Restoring persisted Moodle installation
2025-03-20T22:26:15.393394552Z moodle 22:26:15.39 INFO ==> Trying to connect to the database server
2025-03-20T22:26:15.472767014Z moodle 22:26:15.47 INFO ==> Running database upgrade
Moodle directory permissions
Are the following permissions correct or incorrect for my Moodle directory?: ls -la
total 1276
drwxrwxr-x 65 daemon daemon 4096 Feb 10 03:32 .
drwxr-xr-x 6 barkingb barkingb 4096 Mar 20 22:43 ..
drwxrwxr-x 16 daemon daemon 4096 Feb 7 13:18 admin
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 ai
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 analytics
drwxrwxr-x 16 daemon daemon 4096 Feb 7 13:18 auth
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 availability
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 backup
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 badges
-rw-rw-r-- 1 daemon daemon 311 Feb 7 13:18 behat.yml.dist
drwxrwxr-x 48 daemon daemon 4096 Feb 7 13:18 blocks
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 blog
-rw-rw-r-- 1 daemon daemon 1162 Feb 7 13:18 brokenfile.php
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 cache
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 calendar
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 cohort
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 comment
drwxrwxr-x 6 daemon daemon 4096 Feb 7 13:18 communication
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 competency
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 completion
-rw-rw-r-- 1 daemon daemon 2094 Feb 7 13:18 composer.json
-rw-rw-r-- 1 daemon daemon 168233 Feb 7 13:18 composer.lock
-rw-rw-r-- 1 daemon daemon 68644 Feb 7 13:18 config-dist.php
-rw-r----- 1 root daemon 986 Dec 22 2023 config.php
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 contentbank
-rw-rw-r-- 1 daemon daemon 2651 Feb 7 13:18 CONTRIBUTING.md
-rw-rw-r-- 1 daemon daemon 35147 Feb 7 13:18 COPYING.txt
drwxrwxr-x 10 daemon daemon 4096 Feb 7 13:18 course
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 customfield
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 dataformat
-rw-rw-r-- 1 daemon daemon 2675 Feb 7 13:18 draftfile.php
-rw-rw-r-- 1 daemon daemon 1382 Feb 7 13:18 editmode.php
drwxrwxr-x 19 daemon daemon 4096 Feb 7 13:18 enrol
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 error
-rw-rw-r-- 1 daemon daemon 8426 Feb 7 13:18 .eslintrc
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 favourites
-rw-rw-r-- 1 daemon daemon 3919 Feb 7 13:18 file.php
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 files
drwxrwxr-x 18 daemon daemon 4096 Feb 7 13:18 filter
-rw-rw-r-- 1 daemon daemon 597 Feb 7 13:18 .gherkin-lintrc
-rw-rw-r-- 1 daemon daemon 142 Feb 7 13:18 .gitattributes
-rw-rw-r-- 1 daemon daemon 953 Feb 7 14:42 githash.php
drwxrwxr-x 3 daemon daemon 4096 Feb 7 13:18 .github
drwxrwxr-x 11 daemon daemon 4096 Feb 7 13:18 grade
drwxrwxr-x 6 daemon daemon 4096 Feb 7 13:18 group
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 .grunt
-rw-rw-r-- 1 daemon daemon 9671 Feb 7 13:18 Gruntfile.js
drwxrwxr-x 9 daemon daemon 4096 Feb 7 13:18 h5p
-rw-rw-r-- 1 daemon daemon 1423 Feb 7 13:18 help_ajax.php
-rw-rw-r-- 1 daemon daemon 1872 Feb 7 13:18 help.php
-rw-rw-r-- 1 daemon daemon 5435 Feb 7 13:18 index.php
drwxrwxr-x 3 daemon daemon 4096 Feb 7 13:18 install
-rw-rw-r-- 1 daemon daemon 25849 Feb 7 13:18 install.php
-rw-rw-r-- 1 daemon daemon 664 Feb 7 13:18 INSTALL.txt
drwxrwxr-x 3 daemon daemon 4096 Feb 7 13:18 iplookup
-rw-rw-r-- 1 daemon daemon 16 Feb 7 13:18 .jshintignore
-rw-rw-r-- 1 daemon daemon 1545 Feb 7 13:18 .jshintrc
drwxrwxr-x 3 daemon daemon 4096 Feb 7 13:18 lang
drwxrwxr-x 75 daemon daemon 4096 Feb 7 13:18 lib
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 local
drwxrwxr-x 3 daemon daemon 4096 Feb 7 13:18 login
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 media
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 message
drwxrwxr-x 6 daemon daemon 4096 Feb 7 13:18 mnet
drwxrwxr-x 28 daemon daemon 4096 Feb 10 03:43 mod
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 moodlenet
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 my
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 notes
-rw-rw-r-- 1 daemon daemon 484761 Feb 7 13:18 npm-shrinkwrap.json
-rw-rw-r-- 1 daemon daemon 8 Feb 7 13:18 .nvmrc
-rw-rw-r-- 1 daemon daemon 1825 Feb 7 13:18 package.json
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 payment
-rw-rw-r-- 1 daemon daemon 145 Feb 7 13:18 phpcs.xml.dist
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 .phpstorm.meta.php
-rw-rw-r-- 1 daemon daemon 16002 Feb 7 13:18 phpunit.xml.dist
drwxrwxr-x 14 daemon daemon 4096 Feb 7 13:18 pix
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 plagiarism
-rw-rw-r-- 1 daemon daemon 1677 Feb 7 13:18 pluginfile.php
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 portfolio
drwxrwxr-x 6 daemon daemon 4096 Feb 7 13:18 privacy
drwxrwxr-x 12 daemon daemon 4096 Feb 7 13:18 question
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 rating
-rw-rw-r-- 1 daemon daemon 1894 Feb 7 13:18 README.md
drwxrwxr-x 23 daemon daemon 4096 Feb 7 13:18 report
drwxrwxr-x 6 daemon daemon 4096 Feb 7 13:18 reportbuilder
drwxrwxr-x 25 daemon daemon 4096 Feb 7 13:18 repository
-rw-rw-r-- 1 daemon daemon 3035 Feb 7 13:18 r.php
drwxrwxr-x 4 daemon daemon 4096 Feb 7 13:18 rss
drwxrwxr-x 8 daemon daemon 4096 Feb 7 13:18 search
-rw-rw-r-- 1 daemon daemon 670 Feb 7 13:18 security.txt
-rw-rw-r-- 1 daemon daemon 67 Feb 7 13:18 .shifter.json
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 sms
-rw-rw-r-- 1 daemon daemon 4940 Feb 7 13:18 .stylelintrc
drwxrwxr-x 5 daemon daemon 4096 Feb 7 13:18 tag
drwxrwxr-x 6 daemon daemon 4096 Feb 10 03:38 theme
-rw-rw-r-- 1 daemon daemon 1667 Feb 7 13:18 tokenpluginfile.php
-rw-rw-r-- 1 daemon daemon 3367 Feb 7 13:18 TRADEMARK.txt
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 .upgradenotes
-rw-rw-r-- 1 daemon daemon 71995 Feb 7 13:18 UPGRADING.md
drwxrwxr-x 9 daemon daemon 4096 Feb 7 13:18 user
drwxrwxr-x 2 daemon daemon 4096 Feb 7 13:18 userpix
-rw-rw-r-- 1 daemon daemon 1639 Feb 7 13:18 version.php
drwxrwxr-x 7 daemon daemon 4096 Feb 7 13:18 webservice
Moodle data directory permissions
Are the following permissions correct or incorrect for my Moodle data directory?:
ls -la moodledata
total 6068
drwxrwxrwx 13 daemon root 4096 Mar 19 22:06 .
drwxr-xr-x 6 barkingb barkingb 4096 Mar 20 21:54 ..
drwxrwxrwx 2 daemon root 4096 Jan 25 2023 antivirus_quarantine
drwxrwxrwx 3 daemon root 4096 Mar 20 22:28 cache
drwxrwxrwx 258 daemon root 4096 Jan 25 2023 filedir
-rwxrwxrwx 1 daemon root 128 Jan 16 2023 .htaccess
drwxrwxrwx 2 daemon root 4096 Jan 24 2023 lang
drwxrwxrwx 2 daemon root 4096 Mar 20 22:28 localcache
drwxrwxrwx 6 daemon root 4096 Jan 24 2023 models
-rw-r--r-- 1 daemon daemon 6143850 Mar 20 21:49 moodle-cron.log
drwxrwxrwx 2 daemon root 4096 Mar 20 22:20 muc
drwxrwxr-x 3 daemon daemon 4096 Oct 9 13:49 secret
drwxrwxrwx 2 daemon root 12288 Mar 20 21:25 sessions
drwxrwxrwx 4 daemon root 4096 Mar 20 16:10 temp
drwxrwxr-x 2 daemon daemon 4096 Mar 19 22:06 trashdir
I moved my backup back into the stated directory and it STILL gives the same print!
What has happened? Where did I go wrong?
Thanks.