Skip to content

Instantly share code, notes, and snippets.

@DevinNorgarb
Forked from kirkegaard/dumpoverssh.sh
Created November 10, 2020 12:12
Show Gist options
  • Save DevinNorgarb/ce4fc49531eabc6c2cc5a2d4eb753aeb to your computer and use it in GitHub Desktop.
Save DevinNorgarb/ce4fc49531eabc6c2cc5a2d4eb753aeb 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