4571 Posts in 1382 Topics by 1376 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1290 Views |
-
staticpublisher rsync problem

3 February 2009 at 11:49am
Hi!
First of all I would like to congrat you for a really great CMS!
My question belongs to the "staticpublisher": http://doc.silverstripe.com/doku.php?id=staticpublisher#multiple_server_caching
I've tried to get this working with a cms server and a live server. Both have ssh access and rsync installed.Here is my current config within _config.php: (webmin a user of the live server whom has access to the web dir)
Object::add_extension("SiteTree", "RsyncMultiHostPublisher('cache/', 'html')");
RsyncMultiHostPublisher::set_targets(array(
'webmin@myServer.de:/var/www/silverstripetest'
));Where to put the password?
After dev/buildcache?flush=1 the output says == Done! ==, but sadly no data has been transfered to the live-server.
Has someone an idea why?
Many thanks and best regards,
Bjoern -
Re: staticpublisher rsync problem

5 February 2009 at 9:22am
Hey Björn, you're right, currently RSyncMultiHostPublisher doesn't support password authentication - it relies on key-based authentication for the selected user. I've opened a new enhancement ticket for supporting password auth as well: http://open.silverstripe.com/ticket/3488
As for your publishing problems, can you confirm that the rsync command in RsyncMultiHostPublisher->publishPages() is actually fired?
-
Re: staticpublisher rsync problem

5 February 2009 at 11:44am
Hi Ingo!
Thanks for the quick replay. Yes I can confirm, that the publishPages() get fired but not the rsync command.
This is the loop of the rsync command:
foreach(self::$targets as $target) {
// Transfer non-PHP content from everything to the target; that will ensure that we have all the JS/CSS/etc
$rsyncOutput = `cd $base; rsync -av -e ssh --exclude /.htaccess --exclude '*.php' --exclude '*.svn' --exclude '*~' --delete . $target`;
// Then transfer "safe" PHP from the cache/ directory
$rsyncOutput .= `cd $base; rsync -av -e ssh --exclude '*.svn' --exclude '*~' --delete cache $target`;
if(StaticPublisher::echo_progress()) echo $rsyncOutput;
}It seemed to me that the
is incorrect as well as the`…`
?echo $rsyncOutput;
After changing this to
and doing the ssh access via public keys I'm able to transferecho system($rsyncOutput);
Many thanks and best regards,
Björn
| 1290 Views | ||
|
Page:
1
|
Go to Top |

