Skip to content

Instantly share code, notes, and snippets.

@koy1619
Last active August 29, 2015 14:10
Show Gist options
  • Save koy1619/381873586f98f4b6f44e to your computer and use it in GitHub Desktop.
Save koy1619/381873586f98f4b6f44e to your computer and use it in GitHub Desktop.
mysql查询日志切割脚本
#!/bin/bash
NOW=$(date +"%Y.%m.%d")
cd /tmp
tar zcvf /backup/$NOW-row.tar.gz row.log
:>row.log
#find ${BACKUP_DST} -ctime +30 | xargs rm -rf
# add crontab
# 0 0 * * * sh /opt/row.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment