Jump to:

4945 Posts in 17814 Topics by 1494 members

Installing SilverStripe

SilverStripe Forums » Installing SilverStripe » staticpublisher rsync problem

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

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

Page: 1
Go to End
Author Topic: 1425 Views
  • bschmitt
    Community Member
    22 Posts

    staticpublisher rsync problem Link to this post


    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')");

    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,

  • Ingo
    Forum Moderator
    801 Posts

    Re: staticpublisher rsync problem Link to this post

    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?

  • bschmitt
    Community Member
    22 Posts

    Re: staticpublisher rsync problem Link to this post

    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,

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.