About the backup of massive data tables collected by archive engine
Back up table data by ID interval every day
#! / bin/bash
Date-d yesterday + "DATE Y-%m-%d H:%M:%S" > > / Mysql_Data/t_collection/ID.log
/ usr/bin/mysql-uroot-- password= "admin"-D userbehavior-e "select max (ID) from tasking;" | grep-v 'max (ID)' > > / Mysql_Data/t_collection/ID.log
Today= `tail-n 1 / Mysql_Data/t_collection/ ID. Log`
Yesterday= `tail-n 3 / Mysql_Data/t_collection/ID.log | grep-v 'DATE' | grep-v $today`
Sql= "use userbehavior;\ n
Select * from t_collection where ID > $yesterday and ID3899999999 and ID