Skip to content

Instantly share code, notes, and snippets.

@herdianf
Forked from kirkegaard/dumpoverssh.sh
Created June 16, 2019 09:38
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 herdianf/822c3d50a1ae4edbff4e5ea0985d97c6 to your computer and use it in GitHub Desktop.
Save herdianf/822c3d50a1ae4edbff4e5ea0985d97c6 to your computer and use it in GitHub Desktop.
pipe a mysql dump through gzip and send it over ssh
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