Ad Widget

Collapse

Moving Zabbix to another server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jmcnulty
    Member
    • Nov 2008
    • 33

    #1

    Moving Zabbix to another server?

    I have Zabbix 1.6.1 running currently on an RHEL 4.7 system with mysql-4.1.22-2 installed. This is the production box.

    I want to move it to a new server running RHEL 5.2 with mysql-5.0.45-7 installed. I've already installed and configured Zabbix 1.6.1 on the new server, and given it a single client to look at just to prove it all works.

    Are the steps involved as simple as this, or am I missing something that's going to bite me in the ass?

    1. Stop Zabbix on the new and old servers
    2. On the old server: mysqldump -u root -p zabbix > zab.dmp
    3. Copy the dump file over to the new server
    4. On the new server: mysql -u root -p zabbix < zab.dmp
    5. Start Zabbix on the new server

    I'm guessing I'm missing a step here, in that I'll have to delete the (test) zabbix database on the new server first? Are the differences in mysql versions going to cause me a problem?

    Thanks .. John
  • bbrendon
    Senior Member
    • Sep 2005
    • 870

    #2
    Thats pretty much it. I would do some checking in the database since you're switching from mysql v4 to v5. Also, a test dump/import before hand would be useful if this is a major outage.

    Don't forget if you have scripts/agents/trapd sending info to zabbix you need to update dns/IP.
    Unofficial Zabbix Expert
    Blog, Corporate Site

    Comment

    • jmcnulty
      Member
      • Nov 2008
      • 33

      #3
      Hi. Well it all went well. Just had to drop the zabbix database in mysql on the new node and re-create it as an empty database before loading the dump file.

      I'd already anticipated the possible need to move Zabbix one day, so I'd set up a dedicated IP address for it which was up on eth0:0 on the old box. I just moved that over to the new while the database was loading, then changed the SourceIP and ListenIP addresses in zabbix_server.conf before starting the server again.

      It's running fine

      Thanks for the reply. Always good to sanity check these things first.

      John

      Comment

      • icarus
        Junior Member
        • Jul 2014
        • 3

        #4
        Migrate on prem Zabbix to AWS EC2 and RDS

        Hi Guys,

        Basically I am trying to migrate my local zabbix implementation into AWS and have attempted the following, but cannot see any of the hosts, templates or historical data on the dashboard (although SQL query on the tables does show the data).

        The steps I used were as follows:

        On RDS Instance:
        # mysql> create database zabbix;

        Local MySQL:
        # mysqldump --single-transaction zabbix > zabbix-dump.sql

        Import Dump to RDS:
        # mysql -h zabbix-new.eu-west-1.rds.amazonaws.com -P 3306 -u zabbix zabbix < zabbix-dump.sql -p

        The I restarted zabbix-server and modified a few clients agent conf to use the new EC2 server.

        I'm missing something for the dashboard to recreate the PHP Data?

        Any advise would be much appreciated!

        J

        Comment

        • icarus
          Junior Member
          • Jul 2014
          • 3

          #5
          Originally posted by icarus
          Hi Guys,

          Basically I am trying to migrate my local zabbix implementation into AWS and have attempted the following, but cannot see any of the hosts, templates or historical data on the dashboard (although SQL query on the tables does show the data).

          The steps I used were as follows:

          On RDS Instance:
          # mysql> create database zabbix;

          Local MySQL:
          # mysqldump --single-transaction -t zabbix > zabbix-dump.sql

          Import Dump to RDS:
          # mysql -h zabbix-new.eu-west-1.rds.amazonaws.com -P 3306 -u zabbix zabbix < zabbix-dump.sql -p

          The I restarted zabbix-server and modified a few clients agent conf to use the new EC2 server.

          I'm missing something for the dashboard to recreate the PHP Data?

          Any advise would be much appreciated!

          J
          Updated the mysqldump with [-t] option and dropped the database and created a new one just loading schema.sql

          Tests still in progress - will see...

          Comment

          Working...