Last active
April 2, 2021 06:07
-
-
Save mrmuminov/c82c0b6b81a9f581a1d7f04dbba8206c to your computer and use it in GitHub Desktop.
Remote backup of PostgreSQL, MySQL via SSH
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*** | |
*** of PostgreSQL | |
ssh user@host "pg_dump -U db_user -h localhost -C --column-inserts" \ > dblocal.sql.gz | |
*** of MySQL | |
ssh user@host "mysqldump -u db_user -p db_name | gzip -9" > dblocal.sql.gz | |
*** |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment