diff --git a/dist/.ddev/wunderio/core/tooling-syncdb.sh b/dist/.ddev/wunderio/core/tooling-syncdb.sh index dc76b4a..7b90a98 100755 --- a/dist/.ddev/wunderio/core/tooling-syncdb.sh +++ b/dist/.ddev/wunderio/core/tooling-syncdb.sh @@ -23,11 +23,10 @@ prod_ssh_user=$(echo "$prod_alias" | ddev yq '.\"@self.prod\".user' ) prod_ssh_options=$(echo "$prod_alias" | ddev yq '.\"@self.prod\".ssh.options' ) prod_ssh_host=$(echo "$prod_alias" | ddev yq '.\"@self.prod\".host' ) -echo "Dumping production database to $sql_file." +set -x ssh "$prod_ssh_user@$prod_ssh_host" "$prod_ssh_options" "drush sql-dump --structure-tables-list=cache,cache_*,history,search_*,sessions" > "$sql_file" -echo "Importing production database." ddev import-db --file="$sql_file" -echo "Removing $sql_file." rm "$sql_file" +{ set +x; } 2>/dev/null display_status_message "Sync complete!"