drush sql:syncfor drush 9x


Copy DB data from a source site to a target site. Transfers data via rsync.

drush sql:sync

  • Aliases


    sql:sync has 1 alias/es:


    drush sql-sync

  • Arguments


    sql:sync accepts 2 argument/s:


    source* : A site-alias or the name of a subdirectory within /sites whose database you want to copy from.

    target* : A site-alias or the name of a subdirectory within /sites whose database you want to replace.

  • Options


    sql:sync accepts 17 option/s:


    --no-dump

    --no-dump : no-dump

    --no-sync

    --no-sync : no-sync

    --runner

    --runner : runner

    --create-db

    --create-db : create-db

    --db-su

    --db-su : db-su

    --db-su-pw

    --db-su-pw : db-su-pw

    --target-dump

    --target-dump : target-dump

    --source-dump

    --source-dump : source-dump

    --skip-tables-key

    --skip-tables-key : skip-tables-key

    --structure-tables-key

    --structure-tables-key : structure-tables-key

    --tables-key

    --tables-key : tables-key

    --skip-tables-list

    --skip-tables-list : skip-tables-list

    --structure-tables-list

    --structure-tables-list : structure-tables-list

    --tables-list

    --tables-list : tables-list

    --notify

    --notify : notify

    --druplicon

    --druplicon : druplicon

    --xh-link

    --xh-link : xh-link

  • Examples


    Copy the database from the site with the alias 'source' to the local site.

    drush sql:sync @source @self

    Copy the database from the local site to the site with the alias 'target'.

    drush sql:sync @self @target

    Copy the database from the site in /sites/prod to the site in /sites/dev (multisite installation).

    drush sql:sync #prod #dev

  • Comments


    comments powered by Disqus