Linux technical support - [email protected]


Zabbix delete old history

1) create mysqldump from tables:

history history_log history_str history_str_sync history_sync history_text history_uint history_uint_sync

2) delete those tables from db

3) merge dumps to one file

cat history* > general_data.sql

4) e.g we’d like to delete history with unix time stamp 137XXXXXXX, so we’re should delete lines which contains that stamps

cat general_data.sql | grep -v -E '^INSERT.*,137' > general_137_.sql

load that dump to db back )

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>