Topic Resolution: Answered
Ansicht von 6 Antwort-Threads
  • Autor
    Beiträge
    • #40567
      Answered
      Patrick De Smedt
      Teilnehmer

        Like the title says, I am trying to migrate Otobo 11 from an old installation to a new server.

        Installation goes OK, following the documentation, but restore fails on the database connection:

        DBI connect(‚database=otobo;host=127.0.0.1′,’otobo‘,…) failed: Can’t connect to server on ‚127.0.0.1‘ (115) at /opt/otobo_install/local/lib/perl5/DBIx/Connector.pm line 31.

        I tried with the same version as original server (11.0.11), and when that didn’t work, I tried the latest (11.0.15), but the same error.

        What am I missing?

      • #40618
        marcel-graf
        Teilnehmer

          Hello Patrick,

          is the old one a Mysql or Maria DB?

          I think you use the Backup and Restore documentation legacy on the old server and on the new server the Backup and Restore using Docker documentation?

          Have you set the same DB password in the docker Database? All Plugins/Addons installed?

          Can you connect to maria DB on the Otobo docker

          #———-Example to disable Mail Accounts ——

          sudo docker exec -it otobo_db_1 bash

          cd bin
          mariadb -u root -p      -> for mysql ( mysql -u root -p)

          SHOW Databases;

          use otobo;
          select * from mail_account;

          ;—disable all mail accounts—
          UPDATE mail_account SET valid_id = ‚2‘ where valid_id = ‚1‘;

          KR,

          Marcel

          • #40620
            Patrick De Smedt
            Teilnehmer

              Hi,

              both are Mariadb.
              Indeed, backup on legacy, restore on Docker, using the respective scripts.
              All users and passwords are identical.
              Packages installed (FAQ and MailAccount-OAuth2)

              I can connect to the db from within the db container, and from the other containers, when using ‚db‘ as hostname.
              The restore script tries to connect to 127.0.0.1, but it’s not quite clear to me where it is running from. I think from within the web container.
              Connecting to 127.0.0.1 will only work from within the db container itself.
              Where does the script get the address ‚127.0.0.1‘ from, and how do i tell it to use ‚db‘ as hostname?

               

          • #40628
            Arnold
            Administrator

              Hi Patrick,

              I am guessing you are following there guide: https://doc.otobo.org/manual/installation/11.0/en/content/installation/installation-docker.html

              At witch step do you see the error?

            • #40632
              Patrick De Smedt
              Teilnehmer

                Hi,

                there is no error during installation.

                I get the error when trying to restore the legacy backup into the Docker installation:

                From https://doc.otobo.de/manual/installation/11.0/en/content/backup-restore-docker.html

                For restoring the backup we also need to specify which backup should be restored. The placeholder <TIMESTAMP> is something like 2020-09-07_09-38.

                # restore a backup
                docker_admin> docker run -it --rm --volume otobo_opt_otobo:/opt/otobo --volume otobo_backup:/otobo_backup --network otobo_default rotheross/otobo:latest-11_0 scripts/restore.pl -d /opt/otobo -b /otobo_backup/<TIMESTAMP>

              • #40635
                Best Answer
                Arnold
                Administrator

                  I see. What is happening is, that during restore, the config.pm is extracted first from the backup. Otobo then tries to use the restored settings to apply the backup. Since your native installation used a local database, it tries to connect to the local database (which you do not have in the docker setup). Since the migration to docker is worth the effort, I suggest you unpack the backup, modify the config.pm with the settings for the DB of your installation and repack it. Then you may use the restore script.

                  You might have to check for the settings of elasticsearch in the UI after your import.

                  Good luck!

                • #40640
                  Patrick De Smedt
                  Teilnehmer

                    OK, fixed.

                    I was hoping I didn’t have to mess with the backup files, and that there was some option to point the restore script to the correct database IP, but it turned out not to be so difficult.

                    Restore went OK, after editing databasehost and DSN in the config backup, but then the running, restored system was still going to 127.0.0.1.

                    The config.pm file of the application also had to be changed.

                    Now my docker installation is working.

                    Thank you for the assistance.

                  • #40641
                    Arnold
                    Administrator

                      Awesome! Thanks for the feedback!

                  Ansicht von 6 Antwort-Threads
                  • Du musst angemeldet sein, um auf dieses Thema antworten zu können.