Created
December 7, 2020 16:19
-
-
Save rodricels/a6c3fe63c462647c80625c960da03181 to your computer and use it in GitHub Desktop.
Drush mysql dump by tables
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/bash | |
for i in $(drush sqlq "show tables;"|grep -v Tables_in_); | |
do | |
drush sql:dump --tables-list=$i --result-file=wherever-you-need/backup-$i.sql; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment