drush sql-dumpfor drush 7x


Exports the Drupal DB as SQL using mysqldump or equivalent.

drush sql-dump

  • Options


    sql-dump accepts 14 option/s:


    --result-file

    --result-file : result-file

    --skip-tables-key : A key in the $skip_tables array. @see example.drushrc.php. Optional.

    --structure-tables-key : A key in the $structure_tables array. @see example.drushrc.php. Optional.

    --tables-key : A key in the $tables array. Optional.

    --skip-tables-list : A comma-separated list of tables to exclude completely. Optional.

    --structure-tables-list : A comma-separated list of tables to include for structure, but not data. Optional.

    --tables-list : A comma-separated list of tables to transfer. Optional.

    --create-db

    --create-db : create-db

    --data-only : Dump data without statements to create any of the schema.

    --ordered-dump : Order by primary key and add line breaks for efficient diff in revision control. Slows down the dump. Mysql only.

    --gzip : Compress the dump using the gzip program which must be in your $PATH.

    --database

    --database : database

    --target

    --target : target

    --db-url

    --db-url : db-url

  • Examples


    Save SQL dump to the directory above Drupal root.

    drush sql-dump --result-file=../18.sql

    Skip standard tables. @see example.drushrc.php

    drush sql-dump --skip-tables-key=common

  • Comments


    comments powered by Disqus