Last active
July 7, 2022 09:28
-
-
Save ABGEO/933ab1e198773ec89096e46b5ef83a35 to your computer and use it in GitHub Desktop.
Export-Import Drupal Database
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
#!/bin/env sh | |
mysqldump $DATABASE \ | |
-u $USER \ | |
-p"$PASSWORD" \ | |
-h $HOST \ | |
-P $PORT \ | |
--set-gtid-purged=OFF \ | |
--ignore-table=$DATABASE.$PREFIX_cache_bootstrap \ | |
--ignore-table=$DATABASE.$PREFIX_cache_config \ | |
--ignore-table=$DATABASE.$PREFIX_cache_container \ | |
--ignore-table=$DATABASE.$PREFIX_cache_data \ | |
--ignore-table=$DATABASE.$PREFIX_cache_default \ | |
--ignore-table=$DATABASE.$PREFIX_cache_discovery \ | |
--ignore-table=$DATABASE.$PREFIX_cache_dynamic_page_cache \ | |
--ignore-table=$DATABASE.$PREFIX_cache_entity \ | |
--ignore-table=$DATABASE.$PREFIX_cache_file_mdm \ | |
--ignore-table=$DATABASE.$PREFIX_cache_jsonapi_normalizations \ | |
--ignore-table=$DATABASE.$PREFIX_cache_menu \ | |
--ignore-table=$DATABASE.$PREFIX_cache_page \ | |
--ignore-table=$DATABASE.$PREFIX_cache_render \ | |
--ignore-table=$DATABASE.$PREFIX_cache_toolbar \ | |
> dump.sql |
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
#!/bin/env sh | |
mysql $DATABASE \ | |
-u $USER \ | |
-p"$PASSWORD" \ | |
-h $HOST \ | |
-P $PORT \ | |
-vvv \ | |
< dump.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment