Skip to content

Instantly share code, notes, and snippets.

@combatpoodle
Created December 6, 2013 00:07
Show Gist options
  • Save combatpoodle/7816443 to your computer and use it in GitHub Desktop.
Save combatpoodle/7816443 to your computer and use it in GitHub Desktop.
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)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment