drush core:rsyncfor drush 9x
Rsync Drupal code or files to/from another server using ssh.
drush core:rsync
-
Aliases
core:rsync has 2 alias/es:
drush rsync
drush core-rsync
-
Arguments
core:rsync accepts 3 argument/s:
source* : A site alias and optional path. See rsync documentation and example.site.yml.
target* : A site alias and optional path. See rsync documentation and example.site.yml.',
extra : Additional parameters after the ssh statement.
-
Options
core:rsync accepts 7 option/s:
--exclude-paths
--exclude-paths : exclude-paths
--include-paths
--include-paths : include-paths
--mode
--mode : mode
--ssh-options
--ssh-options : ssh-options
--notify
--notify : notify
--druplicon
--druplicon : druplicon
--xh-link
--xh-link : xh-link
-
Examples
Rsync Drupal root from Drush alias dev to the alias stage.
drush rsync @dev @stage
Rsync all files in the current directory to the 'img' directory in the file storage folder on the Drush alias stage.
drush rsync ./ @stage:%files/img
Rsync Drupal root from the Drush alias dev to the alias stage, excluding all .sql files and delete all files on the destination that are no longer on the source.
drush rsync @dev @stage -- --exclude=*.sql --delete
Customize how rsync connects with remote host via SSH. rsync options like --delete are placed after a --.
drush rsync @dev @stage --ssh-options="-o StrictHostKeyChecking=no" -- --delete
-
Comments
comments powered by Disqus