Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-24917

When backing up a Zabbix 7.0.1 database using PostgreSQL + TimescaleDB and attempting to import it into another Zabbix 7.0.1 instance with PostgreSQL + TimescaleDB, an error occurs.

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 7.0.1
    • None
    • None
    • ubuntu22.04,zabbix7.0.1,timescaledbpostgresql-16,timescaledb-2.14.2

      Backup

      su - postgres c "pg_dump zabbix > /brodata/db_backup/zabbix$(date +%F-%H).sql"

       

      Restore

      systemctl stop zabbix-server

      su - postgres -c "psql -c 'DROP DATABASE IF EXISTS zabbix;'"

      sudo -u postgres createdb -O zabbix zabbix

      su - postgres

      psql -d zabbix -f  /pgbak/zabbix-zabbix-2024-07-26-01.sql

       

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade_prepare.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade_uint.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade_log.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade_str.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/history_upgrade_text.sql | sudo -u zabbix psql zabbix

      cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/option-patches/with-compression/trends_upgrade.sql | sudo -u zabbix psql zabbix

       

      su - postgres

      Psql

      \c zabbix

             DROP TABLE history_old;

             DROP TABLE history_uint_old;

             DROP TABLE history_str_old;

             DROP TABLE history_log_old;

             DROP TABLE history_text_old;

              DROP TABLE trends_old;

       

      When backing up a Zabbix 7.0.1 database using PostgreSQL + TimescaleDB and attempting to import it into another Zabbix 7.0.1 instance with PostgreSQL + TimescaleDB, the following error occurs.

       

            zabbix.dev Zabbix Development Team
            zabbix_1993 zabbix_1993
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: