Announcement

Collapse
No announcement yet.

How do you upgrade a script installation?

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

  • How do you upgrade a script installation?

    I'm very nervous about upgrading my server as the last time I tried I used the wrong commands and completely destroyed my set-up which required a full reinstallation and data re-entry.

    I'm running 8.3.5 which I originally installed via the script installation option. I obviously want to upgrade to 8.4.0

    I took a full backup of my installation using
    sudo /var/www/espocrm/command.sh backup "BACKUP_DIRECTORY"​

    and
    sudo /var/www/espocrm/command.sh export-sql "PATH"​

    and then I ran

    sudo /var/www/espocrm/command.sh upgrade​

    The script appears to run OK but when I log back into EspoCRM it's still showing the version as 8.3.5 in About and telling me there is an update to 8.4.0 available in the Administration menu.

    What is the correct way to perform the upgrade to a version that was originally installed via the script?

    Thanks


  • #2
    I think the correct CLI command to upgrade is mentioned here: https://docs.espocrm.com/administration/upgrading/

    Which is
    php command.php upgrade

    (run withiin /var/www/espocrm)

    Do make sure first that your backups work, try to create a duplicate of you current install using the backups that you creted, that way you will have full confidence in playing around with updating etc..

    Comment


    • #3
      There seems to be many ways to do a backup and upgrade. Seems to be a bit confusing.

      The script installation mentions the commands he used to backup and restore.

      However "Backup and Restore" and the "Upgrading" chapter mentions different methods.

      I'm using the backup script from the Backup and Restore chapter.

      Comment


      • #4
        Originally posted by DashingUno View Post
        I think the correct CLI command to upgrade is mentioned here: https://docs.espocrm.com/administration/upgrading/

        Which is
        php command.php upgrade

        (run withiin /var/www/espocrm)

        Do make sure first that your backups work, try to create a duplicate of you current install using the backups that you creted, that way you will have full confidence in playing around with updating etc..
        Yes I saw that command, but I was concerned that as I had used the script method of install it would break something, which is what happened to me last time.

        I'll have to spin up another instance to check the backup, if no one has a definitive answer, but that's not ideal really as it just takes up more time.

        Ideally the upgrading page should tell you which way to upgrade based on the 3 provided ways of installing,

        Comment


        • DashingUno
          DashingUno commented
          Editing a comment
          The "spin up another instance" is more for checking that the backups that you are making are valid.
          Most people would say you have no backups, if you haven't tested them before.
          Also i'd reccomend that you optimize your process in a way, that restoring the said backup or spinning up another instance would take you 1 command.

          e.g. my Espo is backing up everyday, and to restore or spin up another instance I just need:
          docker exec -i mysql /usr/bin/mysql --user=user --password=password name < /home/backup/main-"date +"%d-%m-%Y"".sql
          unzip -o /home/backup/"date +"%d-%m-%Y"".zip -d /home/espo
          (credentials obfuscated)

          (when making another instance, dont forget to change the database name of the double to another one in /data/config.php, otherwise you secondary instance will use the original database)

      • #5
        Originally posted by ThomasB View Post
        There seems to be many ways to do a backup and upgrade. Seems to be a bit confusing.
        Very!

        Originally posted by ThomasB View Post
        However "Backup and Restore" and the "Upgrading" chapter mentions different methods.
        For example, The method to do a database backup on that page isn't applicable if you installed using the script as it refers to files that don't exist in the scripted installation. The CLI command given on the script installation page does work as you would expect. This is why I'm dubious about using a different command to do the upgrade,

        Comment


        • #6
          why don`t you backup via FTP for the web folder and via phpMyAdmin for the database?
          The upgrade command is the best way to do the upgrade. Execute the command and if there are more upgrade in consequence execute again until the confirmation says you have the last version.

          Comment


          • Gomez
            Gomez commented
            Editing a comment
            The backup process isn't really my issue.

            Having messed up a previous upgrade by issuing the wrong upgrade command I was/am very nervous of getting it wrong again. The upgrade command that is part of the 'how to install EspoCRM by script' doesn't seem to work - it executes fine but doesn't actually upgrade, leaving you with the same version.

            I was nervous about using 'php command.php upgrade' as I don't know if that will work on a environment that was originally installed via the script.

            If you are saying that it will then great!

        • #7
          DashingUno You make excellent points about the validity of the backup. I shall invest some time in making that process automated going forward.

          Comment


          • DashingUno
            DashingUno commented
            Editing a comment
            The reason Im insisting on checking it on another instance, is whats the guarantee that the code base didn't change in a way that would affect your personal setup?
            For example, this week I upgraded from 8.0.5 to 8.4
            For my Espo, it meant that I need to:
            1) Install TCPDF engine as an extension since its depreciated in favour of DomPDF (but we have too many templates to rewrite it to Dom)
            2) Transfer custom fonts from /vendor/tecnickcom/tcpdf/fonts to custom/Espo/Modules/Tcpdf/vendor/tecnickcom/tcpdf/fonts
            3) Change some entities formulaes to utilize brackets, since I guess the order of calculating mathematical equations changed at some point


            My point here is, is that even if the uprgade is succseful, it does not mean its production ready, thus I like to test it out before on another instance of Espo
        Working...
        X