Ad Widget

Collapse

Partition backup

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kay_rus
    Junior Member
    • Oct 2012
    • 4

    #1

    Partition backup

    I need to create a special archive zabbix server. For these purposes I need to backup old partitions on live zabbix and restore them on archive zabbix server. I use simple Mysql 5.1.61

    I've found a partition backup utility xtrabackup:
    Learn how to set up Percona's open source solutions for your database needs. Pick your favorite technology to access our step-by-step guidance and documentation.


    And successfully backed up partitions for one month, but I was not able to restore them to clear database.

    What I tried to do:
    - mysqldump --all-databases --no-data > db.sql
    - altered db.sql and removed unused partitions
    - restored db.sql to archive mysql server
    - stopped mysqld
    - copied files generated by xtrabackup to /var/lib/mysql/zabbix_database
    - started mysqld
    - tried to execute select * from history_log limit 10; and got "mysql was lost" with "segfault" in mysqld.log

    What I did wrong?
    Last edited by kay_rus; 10-10-2012, 16:38.
  • kay_rus
    Junior Member
    • Oct 2012
    • 4

    #2
    Maybe it is possible to implement replication only for data older two month?

    Comment

    • kay_rus
      Junior Member
      • Oct 2012
      • 4

      #3
      I have found another solution for my task.

      Use mysql proxy which will proxy queries to the live and archive DBs. UPDATE, ALTER and INSERT queries will be proxied to both DBs, and SELECT queries only to the live.

      Someone had already done that?

      Comment

      • kay_rus
        Junior Member
        • Oct 2012
        • 4

        #4
        Any suggestions?

        Comment

        • rsvancara
          Member
          • Jul 2012
          • 42

          #5
          Limitations

          I think you are running into some of the many limitations that MySQL has. You might have to build a custom script that takes care of the replication or perform some kind of static dump every night that you import into the archive.

          Comment

          Working...