Skip to main content

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

    Logs into remote @destination via SSH and creates destination database if needed via sql-create.
  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

    Backs up database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.
  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

    Logs into @destination remote via SSH and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the @source alias should be accessible for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database from your source onto your local and transfer back to the Destinationdestination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the @source alias should be accessible for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database onto your local and transfer back to the Destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Here is how drush sql-sync works between two remotes:

  1. Logs into remote @destination via SSH and creates destination database if needed via sql-create.
  2. Backs up database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.
  3. Logs into @destination remote via SSH and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the @source alias should be accessible for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, first dump the database from your source onto your local and transfer back to the destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Improving answer.
Source Link
kenorb
  • 14.3k
  • 10
  • 98
  • 168

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the Source remote is defined@source alias should be accessible for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database onto your local and transfer back to the Destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the Source remote is defined for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database onto your local and transfer back to the Destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the @source alias should be accessible for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database onto your local and transfer back to the Destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.

Source Link
kenorb
  • 14.3k
  • 10
  • 98
  • 168

Here is how drush sql-sync works between two remotes:

  1. Logs-in into @destination remote via ssh and creates destination database if needed via sql-create.

  2. Backups database on @sourceby performing sql-dump on source unless told otherwise and saves it into drush-backups folder.

  3. Logs-in into @destination remote via ssh and executes rsync to transfer database from Source to Destination.

Example: rsync @source:drush-backups/db.sql.gz @destination:/tmp/db.sql.gz

To make this work, you have to make sure that:

  • both local and remote drush have the same version (either 6.x or 7.x),
  • on Destination the Source remote is defined for drush,
  • rsync tool doesn't support two remotes, so only one may be remote.

Based on above it seems you can't use sql-sync drush command to transfer the database between two remotes in drush 7.x (see: #161).

As for workaround, you've to first dump the database onto your local and transfer back to the Destination, in example:

drush @source sql-dump | drush @destination sql-cli

This should transfer the database between two remotes without sql-sync limitation.