Skip to content

Instantly share code, notes, and snippets.

@douglascabral
Last active June 16, 2016 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglascabral/8f3382520fee3d24a6de83e25eecd68b to your computer and use it in GitHub Desktop.
Save douglascabral/8f3382520fee3d24a6de83e25eecd68b to your computer and use it in GitHub Desktop.
MySQL Dump with triggers, views and no-lock (No Downtime)
mysqldump <DATABASE> --host=<IP_HOST> \
--user=<USER> \
--password=<PASSWORD> \
--port=3306 \
--single-transaction \
--routines \
--triggers \
--compress \
--no-set-names \
--skip-add-locks \
--disable-keys \
--skip-comments \
--no-create-db \
--no-data > <DESTINATION_FILENAME>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment