Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


When I'm in graduate school, I plan to use PmWiki to help me keep organized and take notes. However, I need to keep those notes synchronized on several systems, and safeguarded from fatal server errors. What to do?


My solution is to use CVS. Basically, I entered the entire PmWiki directory (which is wiki/ for me) into CVS, which nicely includes wiki.d. Then, I used cron to make regular, automatic backups of the project. This solution assumes you have CVS installed and have basic understanding on how to use it.

Script used: I provide a template of my cron script for the automatic updates. Attach:wikicvs.txt

  1. Share SSH Public Key between project server and CVS repository server. This assumes that the two are not the same server. Since I will be keeping the project on several different computers, this is the case with me. See the page below on the details on sharing the key.
    1. Create the key: ssh-keygen -t dsa, do not use a password. Also, the filename should be the default.
    2. Verify the key was generated (ls ~/.ssh look for
    3. Use SCP to copy the key to the remote server: scp ~/.ssh/ remote:~/.ssh/public-key.tmp
    4. At the remote server, add the key to the authorized-hosts list
      cat ~/.ssh/public-key.tmp>>authorized_keys
  2. Create CVS project for the wiki/.
    cvs import -m "New Project" wiki/ username start
    Read the CVS Documentation for more information.
  3. Establish cron using attached script. My cronline reads thus:
    0 0,4,8,12,16,20 * * * ~/ >>/dev/null 2>&1 You will need to configure one variable WIKIHOME in the script to tell the script where to do the voodoo that it do.


I use SSH to connect to the CVS repository, even when I'm on the same server. This is because I use CVS to keep synchronized my various computers and want uniformity. Regardless, to use CVS with cron, I need to be able to use SSH without using a password. Sharing the public key as it is described above allows for this.

Then, I just create the project ala CVS. This can lead to a problem where the permissions of the files are screwed up, causing a painful experience when you try to use PmWiki after you've CVS'd. So, in the accompanying script, after the repository is updated the permissions are fixed.

See Also


2004-07-09: Initial revision.

Comments & Bugs

Leave this field for future bugs or comments for your script



2004 Benjamin C. Wilson. GNU General Public License pmwiki-2.2.138 -- Last modified by {{BenWilson}}

from IP: ip should be disabled by default for security reasons