Ad Widget

Collapse

backup content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rucha
    Junior Member
    • Oct 2010
    • 13

    #1

    backup content

    Hi ... I am new to zabbix and I need to run a backup. We are using MySql as database. Could you please tell me the files and the data of which i need to take the backup?
    I hv already saved the basic configuration files.
    My aim is to
    Firstly : Prepare a list of the data tht needs to be saved
    Secondly: find or write a bash code which will perform the backup on daily, weekly or monthly basis(as per the need of the data).

    I am thinking of working with the backup manager provided by linux.
    I need to do this as fast as possible n i hope tht it dosent take much time.

    Thanks in advance !!!
  • nelsonab
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Sep 2006
    • 1233

    #2
    You don't often hear of this being talked about too often but you might look at something like the following (high level overivew)

    This requires the use of LVM with enough space to create LVM snapshots
    1) lock the zabbix database
    2) issue an fsync for the database partition
    3) create an LVM snapshot
    4) unlock the zabbix database
    5) mount the snapshot
    6) perform a backup of the snapshot
    7) unmount and destroy the LVM snapshot


    The advantage of this is that your zabbix server is offline only long enough to create the snapshot.

    Here is how one guy did it:
    There are a couple of options available to get consistent backups from MySQL.Use mysqldump with FLUSH TABLES WITH READ LOCKUse a slave with STOP SLAVE and your favourite backup tool.For innodb, use…
    RHCE, author of zbxapi
    Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
    Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

    Comment

    • rucha
      Junior Member
      • Oct 2010
      • 13

      #3
      thankyou for ur reply ... but could you please clarify the content of the zabbix database? what does the zabbix databse consist of?
      what are the things tht i need to take backup of???
      Last edited by rucha; 06-10-2010, 10:21.

      Comment

      • f.koch
        Member
        Zabbix Certified Specialist
        • Feb 2010
        • 85

        #4
        hi,

        We use zmanda (backup without downtime)

        http://www.zmanda.com/backup-mysql.html

        Comment

        • nelsonab
          Senior Member
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2006
          • 1233

          #5
          Originally posted by rucha
          thankyou for ur reply ... but could you please clarify the content of the zabbix database? what does the zabbix databse consist of?
          what are the things tht i need to take backup of???
          That will depend on what database you use. In the case I presented I was referring to MySQL. Usually /var/lib/mysql is where the database files are stored, this would be the directory you would snapshot.
          RHCE, author of zbxapi
          Ansible, the missing piece (Zabconf 2017): https://www.youtube.com/watch?v=R5T9NidjjDE
          Zabbix and SNMP on Linux (Zabconf 2015): https://www.youtube.com/watch?v=98PEHpLFVHM

          Comment

          • rucha
            Junior Member
            • Oct 2010
            • 13

            #6
            thanks

            thanks for the reply ... tht was the answer i was looking at ...
            i found all my tables in /var/lib/mysql/zabbix

            1) I first stopped the server n the agent using:

            /etc/init.d/zabbix-agent stop
            /etc/init.d/zabbix-server stop

            2) later, i did a backup of all of them (except history tables) using the following command
            mysqldump -ppassword zabbix name_of_all_tables_separated_by_space > path_and_name_of_the_file_whr_i_wanted_to_store_th e_data

            3)Restart of server n agent

            I think that a weekly backup would be sufficient.
            What is your opinion?

            Can i do this in a more better way?

            Comment

            Working...