Hey everyone, I have a local "laptop" wiki which uses git as it's version control system. I would like my wiki to be mirrored by my hoster (nearlyfreespeech) so I can browse and edit it on the go as well as have an offsite backup of it if my laptop should ever die. In the last three hours I figured out that:
- I need to install ikiwiki on my nearlyfreespeech site
- I need to create a remote for my local repository on my nfs site.
- I need to setup ikiwiki on nfs
- I need to mirror/sync continously my local laptop repo with the main repo on my server (probably through the remote)
So far I figured out parts of this plan. My status quo is the following:
- laptop:
- srcdir: ~/wiki
- destdir: ~/sites/wiki (this shouldn't matter since it points to my local webserver setup)
- repository: ~/wiki.git
- nfs:
- srcdir: /home/private/wiki
- destdir: /home/public
- repository: /home/private/2wiki.git
- remote repository: /home/private/wiki.git (configured as a remote named "nfswiki" on my laptop)
On my laptop I can now go into ~/wiki, edit some files and afterwards can invoke ikiwiki --setup ~/wiki.setup which will generate a local version of my site for me. If I want to update my server copy, I can go into ~/wiki do git add ., git commit -m "Update", git push nfswiki master (which I hope is the correct way of doing things???). Afterwards I should have a (bare) repo on my nfs server with the same contents as my local (bare) repo, since I setup my remote with my local (bare) repo, which gets updated whenever I update my working copy (= srcdir).
On my server I have installed ikiwiki more or less as described here. I setup this wiki by using the auto.setup method. It works. I basically have an empty wiki waiting to be filled.
But how do I now create the plumbing necessary to let me…
- connect the remote of my laptop repo to the nfs repo?
- connect the nfs repo to the laptop repo through my remote?
- edit either wiki (local/nfs) and the changes get synced to both wikis?
Here my sparse understanding (which is still a generous way to put it) of git is simply not enough.
Pages I have checked out:
I'm very very thankful for any suggestions, since I have myself commited to solve any problems (and at least kinda understand what is involved here) to make this work at least to a degree that I can replicate the results in similar situations.
Thanks for reading and for any tips that you can offer towards making me understand this admittedly complicated and involved question.
I was able to make some progress with this by taking a somewhat different approach. First of all I understand now a little better, that the above setup could be made to work, but it is easier to setup a wiki on my server by hand and then setting up the server repository as a remote of my local repository. After merging/combining the two repos (e.g.: pulling from the server with
--allow-unrelated-histories
and then pushing the local repo to the server) I had a state in which I could let ikiwiki run on my server clone of the local wiki.There's still work to do. I run into problems with exceeding the cpu time limit when trying to do a full rebuild which, because of the complexity of the wiki takes a while. Is there a way to do cumulative rebuilds or something like that?
I also will have to see how well plugins will work on nearly free speech.
ikiwiki --setup /usr/local/etc/ikiwiki/auto.setup
, filling in the correct infos and afterwards customizing the created.setup
file further. That's already it. Plugins can be installed to~/.ikiwiki/IkiWiki/Plugin
. By setting atemplatedir
in the.setup
you can have a templatedir in your user's dir.