Created
June 15, 2020 12:06
-
-
Save alfredbez/657ecfea9801193ce0d84a40b1bf5a97 to your computer and use it in GitHub Desktop.
Dumps a oxid database without the views
This file contains 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
# Replace DBUSER & DBNAME before running this | |
mysqldump \ | |
-uDBUSER \ | |
-p \ | |
DBNAME \ | |
--lock-tables=false \ | |
$(mysql \ | |
-uDBUSER \ | |
-p \ | |
DBNAME \ | |
-Ne"SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='DBNAME' AND TABLE_TYPE='BASE TABLE' " \ | |
) \ | |
| gzip > "/tmp/database-dump.sql.gz" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment