Skip to content

Instantly share code, notes, and snippets.

@combatpoodle
combatpoodle / gist:7816443
Created December 6, 2013 00:07
pt-archiver
pt-archiver --user USER --password PASSWORD --no-check-charset --host=127.0.0.1 --file '/PATH/TABLE_%Y-%m-%d-%D.%t' --for-update --check-slave-lag h=HOST,u=USER,p=PASSWORD --source D=DATABASE,t=TABLE --where 'modified <= DATE_SUB(NOW(), INTERVAL 4 WEEK)'