Setting up rsync with a Windows computer [message #32052] |
Mon, 23 July 2007 17:52  |
orkestra Messages: 65 Registered: May 2007 Location: Kuwait |
Member |
|
|
Hello all,
I'm trying to get rsync to work, but so far, the command prompt gives the following:
>> exec rsync --progress --dry-run -azC...host.com:/usr/home/user/myproject/
.. and nothing seems to be happening.
I'm using Windows XP (technically, it's on a Mac machine running via Parallels). I installed cwRsync, and put its bin/ directory in my environment variables path.
My host supports SSH, and I usually use PuTTy to access my host's server via SSH.
What programs do I need running while performing rsync?
What do I need to do on the server-side to perform rsync?
And do I need another configuration file besides the properties.ini file used by symfony?
Thanks for all your help, in advance!
|
|
|
|
|
|
|
|
|
|
|
Re: Setting up rsync with a Windows computer [message #32482 is a reply to message #32480 ] |
Sun, 29 July 2007 23:32   |
orkestra Messages: 65 Registered: May 2007 Location: Kuwait |
Member |
|
|
whatever1998,
I managed to get rsync to work, but without using it from symfony (technically, I now have a file permission issue, but that's another story I'm dealing with).
What I did was, I went to the pakeFunction.php file (as mlier pointed out), in C:\php\PEAR\symfony\vendor\pake\pakeFunction.php (or something similar on your computer).
I modified the following part of the script, as below:
function pake_sh($cmd)
{
$verbose = pakeApp::get_instance()->get_verbose();
pake_echo_action('exec ', $cmd);
// added the following line to display the full rsync command:
echo $cmd;
/*
// commented this part so that the Command Line doesn't freeze up
ob_start();
passthru($cmd.' 2>&1', $return);
$content = ob_get_contents();
ob_end_clean();
*/
if ($return > 0)
{
throw new pakeException(sprintf('Problem executing command %s', $verbose ? "\n".$content : ''));
}
return $content;
}
Now, when you type the sync command
symfony sync production go
You will get the complete rsync command. Copy that (right-click -> Mark. Then highlight the command, and press Enter). You can paste it to a text editor and make sure it's on a single line (no line breaks).
Paste it back to the command line, and press Enter. You should get a message that the RSA isn't recognized, or something like that. Choose 'Yes'.
You will be asked for your password (to access the server via SSH). Enter your password, and rsync should start up.
If I lost you in any of the steps, please say so, and I'll add some extra info in there.
I hope your problem and solution are the same as mine, so my experience can be of benefit to you.
|
|
|
|
|
|
|
|
|
|
|
Re: Setting up rsync with a Windows computer [message #35880 is a reply to message #35862 ] |
Tue, 18 September 2007 17:04   |
lajkonik86 Messages: 190 Registered: June 2007 Location: The Netherlands |
Senior Member |
|
|
fix would be nice
[Updated on: Tue, 18 September 2007 17:04]
|
|
|
|
|
|
|
Re: Setting up rsync with a Windows computer [message #38029 is a reply to message #32052 ] |
Wed, 24 October 2007 12:33   |
flat stanley Messages: 46 Registered: November 2006 Location: London |
Member |
|
|
The problem definately seems to be with the passthru() command.
mlier....
Quote: | the passthru function works well. I tried :
php -r "passthru('rsync 2>&1');"
It responds well. So rsync works well too.
|
This is correct but if you get the full rsync command using Orkestra's workaround and try using passthru with this, then it hangs (in exactly the same way as when you use the symfony sync command).
I tried changing passthru to exec, but it still hangs.
Antique Silver, Hester Bateman Silver, Collecting Silver
|
|
|
|
|
|
|
Re: Setting up rsync with a Windows computer [message #40250 is a reply to message #39700 ] |
Sun, 25 November 2007 16:48   |
andrewm Messages: 35 Registered: June 2006 |
Member |
|
|
The workaround noted above does not work for me in PHP 5.2.4 on my windows dev machine.
Has anyone reported this as a bug? I looked and found nothing.
It looks like the PHP people are not going to 'fix' this. Looks like Pake will have to be modified to deal with proc_open or something else to get around this change.
[Updated on: Sun, 25 November 2007 16:50]
|
|
|
|
|
|
|
|
Re: Setting up rsync with a Windows computer [message #68880 is a reply to message #68230 ] |
Tue, 30 December 2008 21:45   |
Papy Danone Messages: 5 Registered: June 2008 |
Junior Member |
|
|
I've got the exact same problem with PHP 5.2.6... it just freezes
EDIT: ok I found a fix based on the one that was found for 1.0:
replace line 160 in \lib\task\project\sfProjectDeployTask.class.php by:
$this->log($this->getFilesystem()->sh("start cmd /k rsync --progress $dryRun $parameters -e $ssh ./ $user$host:$dir"));
[Updated on: Tue, 30 December 2008 21:55] using version 1.0.16
|
|
|
|
|
|
|
|