Ad Widget

Collapse

Backup and Restore process?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SireOne
    Junior Member
    • Nov 2020
    • 13

    #1

    Backup and Restore process?

    Is it me or is there not a defined process of doing a full backup and restore of a Zabbix system? I'm running the Docker version and would like to move to an Oracle Linux version of Zabbix. I cannot find how to export the configuration and restore to a new instance of Zabbix. You would think there should be an option in Administration to Export Configuration. Can someone point me in the right direction?
  • Zdenek_OMNISENSUIT
    Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Nov 2020
    • 55

    #2
    Hello.

    Zabbix have everything stored in database and in configuration file.
    So use database dump/backup/.. to migrate to new Zabbix installation.
    Or you can use API for export/backup/restore you Zabbix templates/hosts/.. etc
    Or just use web interface for manual exporting/importing templates/hosts/.. if you do not need measured data.
    Etc.

    -------------------------
    omnisensuit.com

    Comment


    • tiaan.vdm@twkcom.co.za
      [email protected] commented
      Editing a comment
      HI,

      what is the procces of backup on API method per host.
  • markfree
    Senior Member
    • Apr 2019
    • 868

    #3
    To complement Zdenek_OMNISENSUIT information, I find this Configuration Export/Import docs very informative.

    Comment

    • SireOne
      Junior Member
      • Nov 2020
      • 13

      #4
      Originally posted by markfree
      To complement Zdenek_OMNISENSUIT information, I find this Configuration Export/Import docs very informative.
      This is what I was looking for, thanks much. I'm not concerned about retaining historical data, just the configuration and more specifically Hosts groups, Actions & Discovery. I see options for the export of Hosts/Template, so I'm good there. Has someone developed an all in one export/import script using the API?

      Comment

      • SireOne
        Junior Member
        • Nov 2020
        • 13

        #5
        Anyone have any guide on doing a backup from Docker (on Synology)?

        Comment

        • Zdenek_OMNISENSUIT
          Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Nov 2020
          • 55

          #6
          Hello.

          It depend - what you really want to do.
          Backup whole container or somethin from the container?
          For first option try something like this:

          For second option you will need connection to the container and/or to the app inside (like db etc) and than use standart way for the make a backup you need.


          -------------------------
          omnisensuit.com

          Comment

          • SireOne
            Junior Member
            • Nov 2020
            • 13

            #7
            Originally posted by Zdenek_OMNISENSUIT
            Hello.

            It depend - what you really want to do.
            Backup whole container or somethin from the container?
            For first option try something like this:

            For second option you will need connection to the container and/or to the app inside (like db etc) and than use standart way for the make a backup you need.


            -------------------------
            omnisensuit.com
            What's I'm really trying to do is backup Zabbix from a Docker instance and restore to a Oracle 8 instance. I noticed that going through the Configuration Export/Import docs above, some things were missing such as exporting Actions, Discovery rules, User group/roles etc. Seems like a full database backup and restore is what I may need. Would be nice if the UI provided a full configuration export (minus history etc.) so that it can be restored on a new system.

            Comment

            • Zdenek_OMNISENSUIT
              Member
              Zabbix Certified SpecialistZabbix Certified Professional
              • Nov 2020
              • 55

              #8
              You are right - with just exp/imp from web GUI some things will be missing.
              Export/import db will not help(not possible) in the case you describe because as i see you will change db engine.
              (you mentioned oracle as a destination and in the container is probably something like mysql ..)
              Is this really needed? (are you sure about Oracle 8?)
              If yes your only option will be export of setup from zabbix API.
              (write some python script for example)
              Or export from GUI what is possible and setup the rest.


              -------------------------
              omnisensuit.com

              Comment

              • SireOne
                Junior Member
                • Nov 2020
                • 13

                #9
                Originally posted by Zdenek_OMNISENSUIT
                You are right - with just exp/imp from web GUI some things will be missing.
                Export/import db will not help(not possible) in the case you describe because as i see you will change db engine.
                (you mentioned oracle as a destination and in the container is probably something like mysql ..)
                Is this really needed? (are you sure about Oracle 8?)
                If yes your only option will be export of setup from zabbix API.
                (write some python script for example)
                Or export from GUI what is possible and setup the rest.


                -------------------------
                omnisensuit.com
                Referring to Oracle Linux 8 as a replacement to Centos Linux. So Zabbix has no built-in support for backup/restore and this has to be figured out by the customer?
                Seems odd they would refer to backup database/config files during version upgrades, but doesn't really provide any steps on restore.

                Comment

                • Zdenek_OMNISENSUIT
                  Member
                  Zabbix Certified SpecialistZabbix Certified Professional
                  • Nov 2020
                  • 55

                  #10
                  Aha, you mean OS
                  (I see only Oracle word so it was db for me)
                  Than you should check how to work with database you use and learn backup/restore or better export/import for this case.


                  -------------------------
                  omnisensuit.com

                  Comment

                  • SireOne
                    Junior Member
                    • Nov 2020
                    • 13

                    #11
                    Originally posted by Zdenek_OMNISENSUIT
                    Aha, you mean OS
                    (I see only Oracle word so it was db for me)
                    Than you should check how to work with database you use and learn backup/restore or better export/import for this case.


                    -------------------------
                    omnisensuit.com
                    Well, I figured as much, but wanted to see if anyone had experience in exporting the MySQL database from a Synology Docker instance.

                    Comment

                    • Colttt
                      Senior Member
                      Zabbix Certified Specialist
                      • Mar 2009
                      • 878

                      #12
                      We use this script to get just the configuration data and we can restore it to the database directly.
                      Debian-User

                      Sorry for my bad english

                      Comment

                      • SireOne
                        Junior Member
                        • Nov 2020
                        • 13

                        #13
                        Originally posted by Colttt
                        We use this script to get just the configuration data and we can restore it to the database directly.
                        Thanks for this. Will need to test with the latest version of Zabbix.

                        One thing to note, I was able to find a link (below) that contains the mysqldump command for Docker, which works. I did get this to work, but when I restored, the Zabbix server running on Rocky Linux/MySQL/Apache would not start. I'm thinking this may be due to some incompatibles.
                        Any thoughts on this? I really just want to restore the configurations, nothing else.

                        Comment

                        • SireOne
                          Junior Member
                          • Nov 2020
                          • 13

                          #14
                          Originally posted by Colttt
                          We use this script to get just the configuration data and we can restore it to the database directly.
                          This script seems to be compatible for Zabbix version 4.4.4. Anything out there that supports 5.2.1 which also supports Docker?

                          Comment

                          • Colttt
                            Senior Member
                            Zabbix Certified Specialist
                            • Mar 2009
                            • 878

                            #15
                            Originally posted by SireOne

                            This script seems to be compatible for Zabbix version 4.4.4. Anything out there that supports 5.2.1 which also supports Docker?
                            of course, you can use one of the pullrequests or a fork: https://github.com/npotorino/zabbix-backup which included the request reagarding zabbix 5.4
                            Debian-User

                            Sorry for my bad english

                            Comment

                            Working...