How to recreate the queue_log file from DB data
The following MySQL query can be used to generate a queue_log file based on the data stored in Asternic MySQL tables, this is useful if you want to upgrade to a new version, or move Asternic to another server when you cannot dump the complete database, or passing the data from lite to pro versions. The query to run is Asternic Lite and old Asternic PRO versions is:
select unix_timestamp(datetime),uniqueid,queue,agent,event,info1,info2,info3,info4 from queue_stats q INNER JOIN qname ON qname = qname.qname_id INNER JOIN qagent ON q.qagent = agent_id INNER JOIN qevent ON q.qevent = qevent.event_id ORDER BY datetime INTO OUTFILE '/tmp/queue_log_generado' FIELDS TERMINATED BY '|';
For Asternic 2.0.x the query is:
select unix_timestamp(datetime),uniqueid,queue,agent,event,info1,info2,info3,info4,info5 from queue_stats q INNER JOIN qname ON qname = qname.queue_id INNER JOIN qagent ON q.qagent = agent_id INNER JOIN qevent ON q.qevent = qevent.event_id ORDER BY datetime INTO OUTFILE '/tmp/queue_log_generado' FIELDS TERMINATED BY '|';