Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I receive a series of errors when trying to rsync with Drush. Other commands using the same aliases works fine, including: dl en cc.
Here are the outputs:
drush -s rsync @production.geomapper @local.geomapper
Calling system(rsync -e 'ssh ' -akz --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --exclude="settings.php" xxx.org@sXXX.gridserver.com:/home/103821/users/.home/domains/geomapper.org/html// /Applications/MAMP/htdocs/local.geomapper/);
and
drush --debug rsync @production.geomapper @local.geomapper
Bootstrap to phase 0. [0 sec, 3.31 MB] [bootstrap]
Drush bootstrap phase : _drush_bootstrap_drush() [0.01 sec, 3.5 MB] [bootstrap]
Cache HIT cid: 5.0-rc4-commandfiles-0-71e89398afa74353303e443164ae9156 [0.01 sec, 3.51 MB] [debug]
Bootstrap to phase 0. [0.04 sec, 7.44 MB] [bootstrap]
Bootstrap to phase 0. [0.05 sec, 7.44 MB] [bootstrap]
Found command: core-rsync (commandfile=core) [0.05 sec, 7.44 MB] [bootstrap]
Including /Applications/drush/commands/core/rsync.core.inc [0.06 sec, 7.45 MB] [bootstrap]
Load alias @production.geomapper [0.06 sec, 7.53 MB] [notice]
Load alias @mtServer [0.08 sec, 7.55 MB] [notice]
Load alias @local.geomapper [0.15 sec, 7.55 MB] [notice]
You will destroy data from /Applications/MAMP/htdocs/local.geomapper/ and replace with data from xxx.org@sXXX.gridserver.com:/home/XXX/users/.home/domains/geomapper.org/html//
Do you really want to continue? (y/n): y
Calling system(rsync -e 'ssh ' -akzv --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --exclude="settings.php" --stats --progress xxx.org@sXXX.gridserver.com:/home/XXX/users/.home/domains/geomapper.org/html// /Applications/MAMP/htdocs/local.geomapper/);
rsync: on remote machine: -vlkogDtprz: unknown option
rsync error: syntax or usage error (code 1) at main.c(1107)
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at /SourceCache/rsync/rsync-40/rsync/io.c(452) [receiver=2.6.9]
Could not rsync from [error]
xxx.org@sXXX.gridserver.com:/home/XXX/users/.home/domains/geomapper.org/html//
to /Applications/MAMP/htdocs/local.geomapper/ [22.88 sec, 7.68 MB]
Command dispatch complete [22.88 sec, 7.65 MB] [notice]
Peak memory usage was 9.07 MB [22.88 sec, 7.65 MB] [memory]
and
drush status
PHP configuration : /Users/xxx/.drush/drush.ini
Drush version : 5.0-rc4
Drush configuration : /Users/xxx/.drush/drushrc.php
Drush alias files : /Users/xxx/.drush/aliases.drushrc.php
here are the aliases:
################### Local aliases ###################
$aliases['local.geomapper'] = array(
'uri' => 'localhost:8888/local.geomapper',
'root' => '/Applications/MAMP/htdocs/local.geomapper',
'%dump-dir' => '/Applications/MAMP/htdocs/tmp',
'%dump' => '/Applications/MAMP/htdocs/tmp/dump.sql',
);
################### MT aliases ###################
$aliases['mtServer'] = array(
'remote-host' => 'sXXX.gridserver.com',
'remote-user' => 'xxx.org',
'path-aliases' => array(
'%drush' => '/home/XXX/users/.home/bin/drush/',
'%drush-script' => '/home/XXX/users/.home/bin/drush/drush_ssh',
'%dump-dir' => '/home/XXX/users/.home/data/tmp/',
),
);
$aliases['production.geomapper'] = array(
'parent' => '@mtServer',
'uri' => 'geomapper.org',
'root' => '/home/XXX/users/.home/domains/geomapper.org/html',
);
I am a Drush enthusiast - but very much a novice - so any advice would be much appreciated.
Comments
Comment #1
EWB CreditAttribution: EWB commentedComment #2
greg.1.anderson CreditAttribution: greg.1.anderson commentedCheck the version of rsync running on the remote machine; it is what is giving you the error.
From your logs, this is what drush is running:
rsync -e 'ssh ' -akzv --exclude=".git" --exclude=".gitignore" --exclude=".hg" --exclude=".hgignore" --exclude=".hgrags" --exclude=".bzr" --exclude=".bzrignore" --exclude=".bzrtags" --exclude=".svn" --exclude="settings.php" --stats --progress xxx.org@sXXX.gridserver.com:/home/XXX/users/.home/domains/geomapper.org/html// /Applications/MAMP/htdocs/local.geomapper/
If you execute that same line from the cli, you should see the same error message:
rsync: on remote machine: -vlkogDtprz: unknown option
Try editing the rsync line until it works. Take out --stats, --progress, and replace -akzv with just -az for starters. Consult
man rsync
for more help; we don't really support rsync here.Comment #3
EWB CreditAttribution: EWB commentedThanks. typing rsync --version on the remote returns rsync version 2.6.4 protocol version 29 And, I completely understand re: the not supporting rsync... I couldn't figure out if I was doing something wrong vis-a-vis the Drush configuration.
Comment #4
greg.1.anderson CreditAttribution: greg.1.anderson commentedThe oldest version of rsync I have used is version 2.6.8, protocol version 29, which has some deficiencies compared to protocol version 30. Run 'man rsync' on the target system and check for supported flags. It may or may not be possible to use this version of rsync with drush. Another thought I had is that since -akzv seems to be expanding to -vlkogDtprz, maybe avoid using -a and instead use only the individual mode switches that you need. One of logDtpr is probably unsupported.
Comment #5
EWB CreditAttribution: EWB commentedThanks, I am actually going to see if I can get the rsync version upgraded and then investigate 2.6.4's abilities as a plan B.