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 )