Ad Widget

Collapse

Best upgrade method from 5.0LTS to 7.0LTS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zbx_nm
    Junior Member
    • Jun 2024
    • 4

    #1

    Best upgrade method from 5.0LTS to 7.0LTS

    Hi all,

    First time doing a Zabbix upgrade at all, so looking for some advice.

    We have a CentOS 7 box running Zabbix 5.0 LTS / MySQL 5.5
    Our end state is Ubuntu 22 with Zabbix 7.0 LTS / MySQL whatever in the repo (currently 8)

    I am trying to work out the best way to get this done.
    Originally I was going to install Zabbix 5.0 on a new Ubuntu 22 box and migrate the DB and then repo upgrade it, but there is no server version for Ubuntu 22.
    I then considered doing an Inplace upgrade from CentOS 7 to Rocky 8 and then doing a Zabbix upgrade to version 6 - which mostly worked.... but i didn't do the DB upgrade right and rolled back

    I am reading that I can just do a fresh install of Zabbix 7 on Ubuntu and then just import the 5.0 database? But i don't get how that will work with the schema updates required in version 6

    It was at this point i decided to just post here for some advice.

    Another thing i am tossing around doing is migrating just the database to a temporary server and then doing the rest of the upgrade.

    Have servers and VMs to spare. Know enough about linux to be comfortable with doing these kinds of things - i just want the method that will give us stability long term. We do have a few custom templates and things, but it is a pretty vanilla install.

    Thoughts appreciated, or even blogs. I did read a few, but they differed wildly

    TIA
  • Markku
    Senior Member
    Zabbix Certified SpecialistZabbix Certified ProfessionalZabbix Certified Expert
    • Sep 2018
    • 1781

    #2
    Install new server(s) for Zabbix and database, I'd recommend Debian 12 but you go with what you like. Then dump and import the old database to the new database server, and start Zabbix server with it, it will update the database automatically.

    Remember to read and understand all the release and upgrade notes between 5.0 and 7.0. There may be some database changes that you should/must do manually as well.

    This way you have no limits with the retries if needed.

    Markku

    Comment

    • cyber
      Senior Member
      Zabbix Certified SpecialistZabbix Certified Professional
      • Dec 2006
      • 4807

      #3
      Yep, as Markku says... just import your old DB schema and data to new DB, first start of zabbix server should do all upgrade tasks. Remember not to install new schema before importing DB.

      Comment

      • zbx_nm
        Junior Member
        • Jun 2024
        • 4

        #4
        Thanks. I'll give that method a go then

        Comment

        • zbx_nm
          Junior Member
          • Jun 2024
          • 4

          #5

          Worked a treat. Guess I was overthinking it just a bit haha

          The only issue i had was with some locales, but those issues are documented in other posts.

          For anyone finding it later, remember to tweak your InnoDB settings in MySQL / MariaDB BEFORE starting the import of a 44GB SQL file (facepalm)

          Comment

          • Terredise
            Junior Member
            • Jul 2024
            • 1

            #6
            Originally posted by zbx_nm
            Worked a treat. Guess I was overthinking it just a bit haha

            The only issue i had was with some locales, but those issues are documented in other posts.

            For anyone finding it later, remember to tweak your InnoDB settings in MySQL / MariaDB BEFORE starting the import of a 44GB SQL file (facepalm)
            hi, I've got a 30G SQL dump from MariaDB waiting to import to MySQL on a new VM. Not a DB guru, so would you please elaborate on tweaking InnoDB settings? And I assume you just created a new Zabbix DB and used the command mysql -uroot -p zabbix < zabbix.sql? Thank you.

            Comment

            • idanam7761
              Junior Member
              • Sep 2024
              • 2

              #7
              yeah, second to the elaboration on tweaking InnoDB settings.

              Comment

              • zbx_nm
                Junior Member
                • Jun 2024
                • 4

                #8
                Sorry, I only just saw these and probably well outdated now.
                For me I didn't tweak anything before the import so it was hamstrung.

                I ended up using some online calculators and ended up with this, however it may not be right your for your deployment and encourage you to understand the settings before you use this:
                Code:
                [mysqld]
                host_cache_size=0
                skip-name-resolve=1
                max_connections=300
                join_buffer_size=256MB
                innodb_buffer_pool_size=4G
                innodb_log_buffer_size=512M
                innodb_log_file_size=1G
                innodb_write_io_threads=16
                innodb_buffer_pool_instances=8
                innodb_redo_log_capacity=1G
                innodb_flush_log_at_trx_commit=0
                symbolic-links=0

                Comment

                • cyber
                  Senior Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Dec 2006
                  • 4807

                  #9
                  innodb_file_per_table=ON
                  I have been once suggested to turn this on...
                  https://dev.mysql.com/doc/refman/9.1...blespaces.html

                  Comment

                  Working...