Announcement

Collapse
No announcement yet.

migration from webspace to VM

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • migration from webspace to VM

    I am working with Espo CRM since 2018. It was installed in webspace provided by Host Europe who run databases with mysql. Now i need to migrate to a VM which i administrate myself. For the time being i set up a LAMP server. Now i have no idea how to migrate data because i cannot copy the data base. But i can export data with various options. How can i use this for setting up a complete new Espo?
    found a way to export as .sql
    Last edited by blaumeise; 11-22-2022, 09:00 AM.

  • #2
    Hi,

    this is for espocrm version >=6 (if remember) and you have all manipulation.

    What you need, your espocrm version is very important, so you can prepare VM (apache/config/nginx/mysql/version) ..


    Comment


    • #3
      Thank you
      I read this article before.

      First issue is that i do not know the version and cannot find out because it cannot be started any longer. I installed in 2018. oes this mean that i cannot import in the newest version?

      Unfortunately i cannot run console or script where the data base currently is. The webspace allowed to have a sql file for backup.
      Now i am not aware how to use it in this command:
      mysql --user=YOUR_DATABASE_USER --password=YOUR_DATABASE_PASSWORD YOUR_DATABASE_NAME < db.sql​

      Comment


      • #4
        In a complete different application with sql and windows i can just exchange the database file. Would this work with same databasename/username/password but different ESPO versions?

        Comment


        • #5
          I think you are completely lost. No offense, but you should know basic things about installation of webfolders and database in an hosting environment. But let`s try to find a way:

          1. What exactly do you have from you formerly hoster. I suppose you may have a zip-file containing the webfolders and a database export file (ending in .sql)
          2. Forget for a moment any commands or alike.
          3. You should try to migrate your former (working?) installation from your hoster to your recent environment. Which LAMP Stack do you use? You really want to administrate your own Virtual Host (I guess you mean Virtual Host and not Virtual Machine (VM))?
          4. Let´s assume, you want to install your formerly working installation on a local environment, then you will have to do the following:
          - copy all webfolders to your webroot in your LAMP (normallly the root folder ist named "www" or "htdocs" etc.
          - create a MySQL or MariaDB database in your LAMP Stack (the "M" stands for MySQL database).
          - import your backup database file (should end with .sql)
          - change the database credentials (user and password in your espoCRM->data->config.php (The path and file depend on the last version you ran, this indicated here was before 7.2.x)
          - now you should get access to your old installation (obviously installed locally).
          5. Now you could run the updates form your version to the most recent.
          This you should make by command in command line interface, starting in your root folder:
          php command,php upgrade (the php in the beginning ist necessary only, when your LAMP stack is on Windows, as far as I know). You need an internet connection for this.
          6. Run the command again and again, until the message says "you have the most recent version"

          If there are any errors when trying to access, look first into the espoCRM logfiles: ->data->logs

          To migrate to your new online server you do nearly the same things again: Saving the webfolders and exporting the database first and on the new server installing the webfolders and importing the database.

          Comment


          • #6
            Don't worry about offense. For help you can tell me anything.
            1. yes, exactly
            2. ok
            3. I need to administrate my own. The new LAMP uses most recent which do not work with my ESPO of today. The update to PHP 8 killed it.

            So first i need to build a LAMP with PHP 7.

            Comment


            • #7
              yes you have to start with PHP 7.34 e.g.
              With your files that should work. If anything does not work, ask here again.

              Comment


              • #8
                I think the first thing that you need to do, is get the Espo instance actually running, and then think about exporting the data.

                As an alternative to LAMP, you can follow any EspoCRM docker installation guide on the internet (google "EspoCRM docker guide")
                But instead of "latest" image, use an older image which still supports PHP 7 (oldest available is 6.0.0)
                Use your hosting backup as storage volume for the container (or just move it there after successful installation).

                If you want to go specifically the LAMP route, a lot depends on what system you are running it on? If its ubuntu, you can probably get away with following this to get an older php version.

                Then comes the data moving, you should just be able to import your .sql file into the container database

                Comment


                • DashingUno
                  DashingUno commented
                  Editing a comment
                  Please keep in mind, as shalmaxb said, you need at least some basic knowledge about webservers, and server infrastructure.

                  Like for example if your underlying setup is a Windows 10 machine, running VirtualBox with an ubuntu image - this is not the way to go about selfhosting. At least not a very stable one.

                  Also if your old Espo instance was publicly accessible, and needs to stay that way, you need to regain control of your domain name, get a public IP address for your VM, point your domain to it, preferably with a reverse proxy underneath, and learn a little about SSL.

              • #9
                I get error 404 with these files. So what is missing? If i place an index.html here it is displayed properly.
                Click image for larger version

Name:	grafik.png
Views:	180
Size:	194.4 KB
ID:	85736

                Comment


                • DashingUno
                  DashingUno commented
                  Editing a comment
                  Sorry if this offends you, but by looking at the questions you are asking, you need to read some articles about how webservers work, or watch a YouTube video.

                  For starters I recommend that you follow EspoCRM official installation guide from start to finish. And then get back to installation of your own version.

                  If you just ran "sudo apt-get install lamp-server^" and copied your files to /var/www - it is not going to work
                  Unfortunately it is not that simple

              • #10
                you should at least provide more information:

                1. Where do you want to install it? Locally or on an online webserver?
                2. Do you really mean VM (= virtual machine)? Where is that VM installed, if it really is a VM? Or do you mean Virtual Host (on a webserver)? And if it is really a VM, why?
                3. What do you use as LAMP stack? Some ready configured stack or just a webserver, mysql server on Linux (because th "L" in Lamp stands for Linux)?
                4. If not on Linux, is it on Windows?
                5. As from the screenshot, you show the folder with a previous installation. This you can see from the size of the data folder, where all your images etc. are saved. This would not be as large in a fresh install. But it is ok, you can copy the folders that way.
                6. I guess, you did not adapt your config.php (in folder data) and there still reside the old database credentials, so this installation cannot connect to the database.
                7. In the folder data, there is a log-file, which (I bet) will tell 100%, what does not work yet. You may post it here for help.
                8. Where in the end do you want to install it?

                Comment

                Working...
                X