X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/80ca685385cd827f19718eaea5fb772782f68d3b..c6ac7409bd95af94257f8bd6e5d5fd2530a4aa63:/doc/plugins/contrib/rsync/discussion.mdwn diff --git a/doc/plugins/contrib/rsync/discussion.mdwn b/doc/plugins/contrib/rsync/discussion.mdwn index a2c2eb725..6bf7a3826 100644 --- a/doc/plugins/contrib/rsync/discussion.mdwn +++ b/doc/plugins/contrib/rsync/discussion.mdwn @@ -24,4 +24,54 @@ to automatically push any changed pages to (1). As a proof of concept, I added an rsync post-commit hook after ikiwiki's usual. It worked, just not for web edits, which is how the wiki will be used. So I wrote this plugin to finish the job. -The wiki now lives on (1), and clicking "edit" just works. +The wiki now lives on (1), and clicking "edit" just works. --[[schmonz]] + +> Just out of interest, why use `rsync` and not `git push`. i.e. a +> different setup to solve the same problem would be to run a +> normal ikiwiki setup on the universities server with its git +> repository available over ssh (same security setup your using +> for rsync should work for git over ssh). On the cgi-capable server, +> when it would rsync, make it git push. It would seem that git +> has enough information that it should be able to be more +> network efficient. It also means that corruption at one end +> wouldn't be propagated to the other end. -- [[Will]] + +>> Hey, that's a nice solution. (The site was in svn to begin with, +>> but it's in git now.) One advantage of my approach in this particular +>> case: server (1) doesn't have `git` installed, but does have `rsync`, +>> so (1)'s environment can remain completely untweaked other than the +>> SSH arrangement. I kind of like that all the sysadmin effort is +>> contained on one host. +>> +>> This plugin is definitely still useful for projects not able to use +>> a DVCS (of which I've got at least one other), and possibly for +>> other uses not yet imagined. ;-) --[[schmonz]] + +---- + +Revew: --[[Joey]] + +* I think it should not throw an error if no command is set. Just don't do anything. +* If the rsync fails, it currently errors out, which will probably also leave + the wiki in a broken state, since ikiwiki will not get a chance to save + its state. This seems fragile; what if the laptop is offline, or the + server is down, etc. Maybe it should just warn if the rsync fails? +* Is a new hook really needed? The savestate hook runs at a similar time; + only issue with it is that it is run even when ikiwiki has not + rendered any updated pages. Bah, I think you do need the new hook, how + annoying.. + +> * Depends whether the plugin would be on by default. If yes, then yes. +> If the admin has to enable it, I'd think they'd want the error. +> * Changed the other errors to warnings. +> * The name might be wrong: there isn't anything rsync-specific about the +> plugin, that's just the command I personally need to run. --[[schmonz]] + +>> One problem with the error is that it prevents dumping a new setup file with +>> the plugin enabled, and then editing it to configure. ie: + + joey@gnu:~>ikiwiki -setup .ikiwiki/joeywiki.setup -plugin rsync -dumpsetup new.setup + Must specify rsync_command + +> rsync seems by far the most likely command, though someone might use something +> to push via ftp instead. I think calling it rsync is ok. --[[Joey]]