Skip to content

Instantly share code, notes, and snippets.

@igorescobar
Created April 26, 2013 13:31
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 igorescobar/5467391 to your computer and use it in GitHub Desktop.
Save igorescobar/5467391 to your computer and use it in GitHub Desktop.
This command executes a full MySQL dump on a remote machine and transfers it back to your local machine.
ssh user@host "mysqldump --lock-tables=0 -h HOST -u USER -pPASSWORD --all-databases | gzip -c" > ~/full_mysql_dump.sql.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment