Skip to content

Instantly share code, notes, and snippets.

@brpaz
Forked from kirkegaard/dumpoverssh.sh
Last active August 29, 2015 14:08
Show Gist options
  • Save brpaz/52b6f4947bfb94b7562c to your computer and use it in GitHub Desktop.
Save brpaz/52b6f4947bfb94b7562c to your computer and use it in GitHub Desktop.
pipe a mysql dump through gzip and send it over ssh #ssh #gzip #mysql

mysqldump -u MYSQL_USERNAME -p YOUR_DATABASE | gzip -c | ssh USERNAME@YOUR_TO_HOST 'cat > ~/dump.sql.gz'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment