Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

staticpublisher rsync problem

Go to End

3 Posts   1848 Views


Community Member, 22 Posts

3 February 2009 at 11:49am


First of all I would like to congrat you for a really great CMS!

My question belongs to the "staticpublisher":
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')");

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,


Forum Moderator, 801 Posts

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:

As for your publishing problems, can you confirm that the rsync command in RsyncMultiHostPublisher->publishPages() is actually fired?


Community Member, 22 Posts

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

echo system($rsyncOutput);
and doing the ssh access via public keys I'm able to transfer :-)

Many thanks and best regards,