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. Rocket.Chat
  3. Import data from another installation

Import data from another installation

Scheduled Pinned Locked Moved Solved Rocket.Chat
importexportmongodbrocket.chat
9 Posts 3 Posters 1.5k Views 3 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.
    • njN Offline
      njN Offline
      nj
      wrote on last edited by girish
      #1

      I intend to import data from existing RocketChat installation in another server to my Cloudron's RocketChat instance. The preferred way is to use mongodump command to export the data, and mongorestore to restore that data to a new server.

      I don't find a way to import the database backup to the mongo instance. There's a Upload to /tmp option in the console for RocketChat, but I need to upload the database dump to the mongodb container.

      How can I import the existing database to my Cloudron RocketChat instance?

      Founder / Coder • My Apps

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

        @nj After you upload the file, you can run the command env | grep CLOUDRON_MONGO in the terminal. This will give you the credentials to access the mongodb container from the app. Is that what you are looking for? I assume it's just a matter of running mongorestore command with the credentials and the dump file after that.

        1 Reply Last reply
        0
        • njN Offline
          njN Offline
          nj
          wrote on last edited by
          #3

          Where do I run the mongorestore command from? The RocketChat instance does not have mongorestore available. I cannot access the shell of Cloudron's mongo addon instance to upload the dump & run the mongorestore command.

          Founder / Coder • My Apps

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

            @nj Indeed, this is a bug in the package. It seems we forgot the mongo-tools package in the latest image 2.0.0. I will push an update shortly.

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

              @nj I have pushed an update, can you please check?

              njN 1 Reply Last reply
              0
              • girishG girish

                @nj I have pushed an update, can you please check?

                njN Offline
                njN Offline
                nj
                wrote on last edited by
                #6

                So quick! It works, thanks! @girish!

                Founder / Coder • My Apps

                1 Reply Last reply
                1
                • kaxlineK Offline
                  kaxlineK Offline
                  kaxline
                  wrote on last edited by
                  #7

                  I'm running into a different issue here where I'm able to run the mongo shell, but mongorestore can't find the instance.

                  This works:

                  mongo -u "${CLOUDRON_MONGODB_USERNAME}" -p "${CLOUDRON_MONGODB_PASSWORD}" ${CLOUDRON_MONGODB_HOST}:${CLOUDRON_MONGODB_PORT}/${CLOUDRON_MONGODB_DATABASE}

                  This doesn't:

                  mongorestore -u "${CLOUDRON_MONGODB_USERNAME}" -p "${CLOUDRON_MONGODB_PASSWORD}" -h ${CLOUDRON_MONGODB_HOST} -p ${CLOUDRON_MONGODB_PORT} -d ${CLOUDRON_MONGODB_DATABASE} /tmp/rocketchat_backup

                  It gives the message:

                  Failed: error connecting to db server: server returned error on SASL authentication step: Authentication failed.

                  Any ideas on what I'm doing wrong? I tried rs.initiate() from inside the shell, but my user doesn't have permissions to run any commands. Can't even do show dbs.

                  Thanks!

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

                    @kaxline Are you trying this from the web terminal? Can you try this guide - https://cloudron.io/documentation/guides/import-mongodb/ ?

                    kaxlineK 1 Reply Last reply
                    1
                    • girishG girish

                      @kaxline Are you trying this from the web terminal? Can you try this guide - https://cloudron.io/documentation/guides/import-mongodb/ ?

                      kaxlineK Offline
                      kaxlineK Offline
                      kaxline
                      wrote on last edited by
                      #9

                      @girish Ah yes, sorry. Should've looked. At least maybe this will direct someone to the docs if they end up here again.

                      1 Reply Last reply
                      0
                      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