Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Dumps a oxid database without the views
# 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