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


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. Mattermost
  3. Mattermost v8.0+ and PostgreSQL

Mattermost v8.0+ and PostgreSQL

Scheduled Pinned Locked Moved Mattermost
41 Posts 8 Posters 5.7k Views 9 Watching
  • 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.
  • girishG Offline
    girishG Offline
    girish
    Staff
    wrote on last edited by
    #27

    New package is published now. I tried the export/import instead of db approach and it works well. The latest version of mattermost has broken import though, I have to report this upstream.

    Some docs at https://docs.cloudron.io/apps/mattermost/#migrate-to-postgres if someone wants to try the migration. I haven't tried the database migration yet.

    1 Reply Last reply
    1
    • girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #28

      Reported the import issue at https://github.com/mattermost/mattermost/issues/27182

      1 Reply Last reply
      1
      • C Offline
        C Offline
        cvachery
        wrote on last edited by
        #29

        Excellent! I will try to migrate an external mattermost with postgresql to Cloudron

        girishG 1 Reply Last reply
        0
        • C cvachery

          Excellent! I will try to migrate an external mattermost with postgresql to Cloudron

          girishG Offline
          girishG Offline
          girish
          Staff
          wrote on last edited by
          #30

          @cvachery I just managed to do a database migration using pgloader. Just publishing my notes in the docs.

          C 1 Reply Last reply
          0
          • girishG girish

            @cvachery I just managed to do a database migration using pgloader. Just publishing my notes in the docs.

            C Offline
            C Offline
            cvachery
            wrote on last edited by
            #31

            @girish Awesome, I will wait for your doc then see if I can validate it 👍

            1 Reply Last reply
            1
            • girishG Offline
              girishG Offline
              girish
              Staff
              wrote on last edited by
              #32

              @cvachery done. https://docs.cloudron.io/apps/mattermost/#database-migration

              1 Reply Last reply
              0
              • LanhildL Offline
                LanhildL Offline
                Lanhild
                App Dev
                wrote on last edited by
                #33

                I'll try and report

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  cvachery
                  wrote on last edited by
                  #34

                  I've mostly done it using the official mattermost documentation : https://docs.mattermost.com/onboard/migrating-to-mattermost.html#migrate-mattermost-from-one-server-to-another and https://docs.mattermost.com/deploy/backup-disaster-recovery.html#backup

                  Copied the config.json from the origin server and changer the SQL settings with the logins from the cloudron mattermost file.

                  Only issue I'm having is the importing of the local data to cloudron. I've around 20GB of data to be moved to the files folder but the upload crash when uploading the tar.gz file. Uploading the file uncompressed crash too after a while (couple of hours)

                  LanhildL 1 Reply Last reply
                  0
                  • C cvachery

                    I've mostly done it using the official mattermost documentation : https://docs.mattermost.com/onboard/migrating-to-mattermost.html#migrate-mattermost-from-one-server-to-another and https://docs.mattermost.com/deploy/backup-disaster-recovery.html#backup

                    Copied the config.json from the origin server and changer the SQL settings with the logins from the cloudron mattermost file.

                    Only issue I'm having is the importing of the local data to cloudron. I've around 20GB of data to be moved to the files folder but the upload crash when uploading the tar.gz file. Uploading the file uncompressed crash too after a while (couple of hours)

                    LanhildL Offline
                    LanhildL Offline
                    Lanhild
                    App Dev
                    wrote on last edited by
                    #35

                    @cvachery said in Mattermost v8.0+ and PostgreSQL:

                    Only issue I'm having is the importing of the local data to cloudron. I've around 20GB of data to be moved to the files folder but the upload crash when uploading the tar.gz file. Uploading the file uncompressed crash too after a while (couple of hours)

                    Try with the cloudron CLI, it might work better

                    1 Reply Last reply
                    0
                    • girishG Offline
                      girishG Offline
                      girish
                      Staff
                      wrote on last edited by
                      #36

                      @cvachery The data directories of apps are at /home/yellowtent/appsdata/{appid}/data . Just cp from one dir to another. The appid you can figure by looking at the URL bar or in the Updates section.

                      1 Reply Last reply
                      1
                      • C Offline
                        C Offline
                        cvachery
                        wrote on last edited by
                        #37

                        Sometimes I do forget that Cloudron isn't a blackbox SaaS application and that I do have access to the server 🙄
                        Currently doing an rsync to the server will let you know when it's all done.
                        Thank you

                        1 Reply Last reply
                        1
                        • C Offline
                          C Offline
                          cvachery
                          wrote on last edited by
                          #38

                          Ok So it's perfectly working.

                          Steps done :

                          • Dumped the PostgreSQL DB and config.json file
                          • Uploaded them to the cloudron server
                          • Copied the files folder to the cloudron server
                          • Imported the dump with psql from the app terminal
                          • Changed the files ownership to cloudron in the file manager
                          • Edited in the config.json from the origin server to add the new files path from the cloudron config.json
                            • "ServiceSettings" => "SiteURL"
                            • "SqlSettings" => "DataSource" and "DataSourceReplicas"
                            • "FileSettings" => "Directory"
                          LanhildL 1 Reply Last reply
                          1
                          • C cvachery

                            Ok So it's perfectly working.

                            Steps done :

                            • Dumped the PostgreSQL DB and config.json file
                            • Uploaded them to the cloudron server
                            • Copied the files folder to the cloudron server
                            • Imported the dump with psql from the app terminal
                            • Changed the files ownership to cloudron in the file manager
                            • Edited in the config.json from the origin server to add the new files path from the cloudron config.json
                              • "ServiceSettings" => "SiteURL"
                              • "SqlSettings" => "DataSource" and "DataSourceReplicas"
                              • "FileSettings" => "Directory"
                            LanhildL Offline
                            LanhildL Offline
                            Lanhild
                            App Dev
                            wrote on last edited by
                            #39

                            @cvachery Do you have a list of commands/queries you've done?

                            I tried both methods, and had issues with them.

                            The 1st (database migration) renders in a plethora of errors with indexes and columns. Even though I followed Cloudron docs and the upstream's, I can't seem to be able to make it work.

                            The 2nd (Bulk import) didn't restore any of my DMs which makes it a no-go.

                            If you could provide some guidance, I'd be very grateful.

                            LanhildL 1 Reply Last reply
                            0
                            • LanhildL Lanhild

                              @cvachery Do you have a list of commands/queries you've done?

                              I tried both methods, and had issues with them.

                              The 1st (database migration) renders in a plethora of errors with indexes and columns. Even though I followed Cloudron docs and the upstream's, I can't seem to be able to make it work.

                              The 2nd (Bulk import) didn't restore any of my DMs which makes it a no-go.

                              If you could provide some guidance, I'd be very grateful.

                              LanhildL Offline
                              LanhildL Offline
                              Lanhild
                              App Dev
                              wrote on last edited by
                              #40

                              @Lanhild said in Mattermost v8.0+ and PostgreSQL:

                              @cvachery Do you have a list of commands/queries you've done?

                              I tried both methods, and had issues with them.

                              The 1st (database migration) renders in a plethora of errors with indexes and columns. Even though I followed Cloudron docs and the upstream's, I can't seem to be able to make it work.

                              The 2nd (Bulk import) didn't restore any of my DMs which makes it a no-go.

                              If you could provide some guidance, I'd be very grateful.

                              @cvachery If you can get back to me on this, I'd be very happy.

                              C 1 Reply Last reply
                              0
                              • LanhildL Lanhild

                                @Lanhild said in Mattermost v8.0+ and PostgreSQL:

                                @cvachery Do you have a list of commands/queries you've done?

                                I tried both methods, and had issues with them.

                                The 1st (database migration) renders in a plethora of errors with indexes and columns. Even though I followed Cloudron docs and the upstream's, I can't seem to be able to make it work.

                                The 2nd (Bulk import) didn't restore any of my DMs which makes it a no-go.

                                If you could provide some guidance, I'd be very grateful.

                                @cvachery If you can get back to me on this, I'd be very happy.

                                C Offline
                                C Offline
                                cvachery
                                wrote on last edited by
                                #41

                                @Lanhild Sorry missed your message.
                                I will see if I can do another test migration this afternoon (CEST) and take some more notes. But basically I wrote the steps below on a clean Mattermost PostgreSQL install:

                                • Dumped the DB with : pg_dump -d mattermost > mattermost.dump
                                • Renamed on cloudron config.json to config.json.orig
                                • Copied mattermost.dump and config.json to cloudron mattermost via the file manager
                                • Edited config.json with the value from config.json.orig (to get the PostgreSQL details)
                                  • "ServiceSettings" => "SiteURL"
                                  • "SqlSettings" => "DataSource" and "DataSourceReplicas"
                                  • "FileSettings" => "Directory"
                                • From the terminal app did PASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} pg_restore -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE} ../data/mattermost.dump
                                • Rsynced all my attachments from origin_server to cloudron_server:app_folder (cf girish post )
                                • Restarted the app
                                1 Reply Last reply
                                1
                                Reply
                                • Reply as topic
                                Log in to reply
                                • Oldest to Newest
                                • Newest to Oldest
                                • Most Votes


                                • Login

                                • Don't have an account? Register

                                • Login or register to search.
                                • First post
                                  Last post
                                0
                                • Categories
                                • Recent
                                • Tags
                                • Popular
                                • Bookmarks
                                • Search