Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    I need to migrate an old Moodle to my new Cloudron Moodle--what are the DB details?

    Moodle
    6
    12
    494
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jordanurbs
      jordanurbs last edited by

      Here are the details I need in order to migrate:
      Screen Shot 2020-11-23 at 1.47.21 PM.png

      M 1 Reply Last reply Reply Quote 0
      • M
        msbt App Dev @jordanurbs last edited by

        you can jump on a terminal and enter env | grep MYSQL, this will give you the database details.

        jordanurbs 1 Reply Last reply Reply Quote 0
        • jordanurbs
          jordanurbs @msbt last edited by

          @msbt said in I need to migrate an old Moodle to my new Cloudron Moodle--what are the DB details?:

          env | grep MYSQL

          Thanks but that doesn't give me anything in the cloudron terminal. Nothing happens

          girish 1 Reply Last reply Reply Quote 0
          • girish
            girish Staff @jordanurbs last edited by girish

            @jordanurbs the cloudron package uses postgres. So try env | grep POSTGRESQL

            M BrutalBirdie jordanurbs 3 Replies Last reply Reply Quote 0
            • M
              msbt App Dev @girish last edited by

              ah my bad, should have omitted the MY from MYSQL 😄

              1 Reply Last reply Reply Quote 0
              • BrutalBirdie
                BrutalBirdie Staff @girish last edited by BrutalBirdie

                @girish said in I need to migrate an old Moodle to my new Cloudron Moodle--what are the DB details?:

                @jordanurbs the cloudron package uses postgres. So try env | grep POSTGRESQL

                @jordanurbs
                You can find out what addons being used for a cloudron app by checking the repo

                https://git.cloudron.io/cloudron/moodle-app

                and the CloudronManifest.json

                https://git.cloudron.io/cloudron/moodle-app/-/blob/master/CloudronManifest.json

                {
                  "id": "org.moodle.cloudronapp",
                  "title": "Moodle",
                  "author": "Moodle developers",
                  "description": "file://DESCRIPTION.md",
                  "tagline": "The world's most popular learning management system",
                  "version": "1.0.0",
                  "healthCheckPath": "/",
                  "httpPort": 8000,
                  "memoryLimit": 524288000,
                  "manifestVersion": 2,
                  "website": "https://moodle.org/",
                  "contactEmail": "support@cloudron.io",
                  "icon": "logo.png",
                  "addons": {
                    "postgresql": {},
                    "localstorage": {},
                    "sendmail": {},
                    "ldap": {},
                    "scheduler": {
                      "periodic": {
                          "schedule": "*/1 * * * *",
                          "command": "/usr/bin/php  /app/code/admin/cli/cron.php >/dev/null"
                      }
                    }
                  },
                  "tags": [ "moodle", "learning", "lms", "canvas", "blackboard", "edutech" ],
                  "changelog": "file://CHANGELOG",
                  "postInstallMessage": "file://POSTINSTALL.md",
                  "mediaLinks": [
                    "https://screenshots.cloudron.io/org.moodle.cloudronapp/1.png",
                    "https://screenshots.cloudron.io/org.moodle.cloudronapp/2.png",
                    "https://screenshots.cloudron.io/org.moodle.cloudronapp/3.jpg"
                  ],
                  "minBoxVersion": "5.3.0",
                  "forumUrl": "https://forum.cloudron.io/category/102/moodle",
                  "documentationUrl": "https://docs.cloudron.io/apps/moodle/"
                }
                

                Or when you open the logs you should have a button for Postgres or MySQL
                😄

                Like my work? Consider donating a beer 🍻 Cheers!

                1 Reply Last reply Reply Quote 2
                • jordanurbs
                  jordanurbs @girish last edited by

                  @girish said in I need to migrate an old Moodle to my new Cloudron Moodle--what are the DB details?:

                  env | grep POSTGRESQL

                  Thanks, that gives me the details.

                  Now I've got a second issue though: the old Moodle only lets me choose between MariaDB or Improved MySQL. Any thoughts?

                  fbartels 1 Reply Last reply Reply Quote 0
                  • fbartels
                    fbartels App Dev @jordanurbs last edited by

                    @jordanurbs this is probably relevant to you https://docs.moodle.org/310/en/Database_transfer

                    1 Reply Last reply Reply Quote 0
                    • martinkbs
                      martinkbs last edited by

                      The query

                      env | grep POSTGRESQL
                      

                      in the terminal returns the following values:

                      CLOUDRON_POSTGRESQL_URL=postgres://...
                      CLOUDRON_POSTGRESQL_DATABASE=
                      CLOUDRON_POSTGRESQL_PASSWORD=
                      CLOUDRON_POSTGRESQL_USERNAME=
                      CLOUDRON_POSTGRESQL_HOST=postgresql
                      CLOUDRON_POSTGRESQL_PORT=5432
                      

                      But what is the value to be entered in the 'Server' field? The IP of the server? Socket IP? Domain?

                      Captura de pantalla 2021-03-15 a las 18.08.48.png

                      Thanks for the help guys! 🙏

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @martinkbs last edited by girish

                        @martinkbs I guess "servidor de la base de datos" means database server ? If so, that is just postgresql (i.e the value of CLOUDRON_POSTGRESQL_HOST). The hostname of the postgres server is posgresql (I know confusing 🙂 ).

                        martinkbs 1 Reply Last reply Reply Quote 0
                        • martinkbs
                          martinkbs @girish last edited by

                          Thanks @girish. But I have a question. The source Moodle is on a different server than Cloudron's Moodle ... it's a server with a Plesk panel 😞

                          In that case, how can the source installation identify which server to send the data to? Wouldn't it be necessary to indicate the IP of the destination server? Or the socket? If I only indicate postgresql, I don't think the data can be migrated from one server to another ... right?

                          girish 1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff @martinkbs last edited by

                            @martinkbs Ah, I missed it that it's trying to transfer the database. Indeed, postgresql is the internal name. There is no public endpoint. What you have to do is to export the postgresql dump from the old instance and import it into Cloudron by hand. Please see https://docs.cloudron.io/guides/import-postgresql/

                            1 Reply Last reply Reply Quote 1
                            • First post
                              Last post
                            Powered by NodeBB