[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. Created: 2024 Jul 26  Updated: 2024 Jul 29  Resolved: 2024 Jul 29

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: None
Affects Version/s: 7.0.1
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: zabbix_1993 Assignee: Zabbix Development Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ubuntu22.04,zabbix7.0.1,timescaledbpostgresql-16,timescaledb-2.14.2


Attachments: PNG File image-2024-07-26-17-01-03-904.png     PNG File image-2024-07-26-17-01-42-695.png    
Issue Links:
Duplicate
duplicates ZBX-23930 invalid partitioning function cuid_ti... Closed
duplicates ZBX-24643 Auditlog table compression Closed

 Description   

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.

 



 Comments   
Comment by Alexander Vladishev [ 2024 Jul 29 ]

It looks like a duplicate of ZBX-23930 and ZBX-24643. Please check documentation updates in this comment.

Generated at Tue May 13 09:10:31 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.