RF Eclectica Wiki

Try to learn something about everything, and everything about something - Thomas Huxley

User Tools

Site Tools


public:computers:dokuwiki_mirror

02 : Computers

Dokuwiki Mirror

I'm running a SANDBOX installation of dokuwiki on the small headless server in have in the shack.

This is to allow me to mess around with templates and layouts and things without impacting the real wiki.

To give it some data - a full mirror of the existing real wiki - I've used rsync

cd /var/www/html/
sudo rsync -av --delete gm4slv@gm4slv.org.uk:/var/www/html/dokuwiki/ ./dokuwiki/

This copies the production wiki into the web server root on the little sandbox machine.

UPDATE — John Pumford-Green 27/04/23 05:53

Added –delete to the command, to remove pages in the Mirror copy that have been deleted from the VPS (production) server, to keep them properly in step.

I can then play around to my heart's content.

The same mechanism would work to retrieve/install the whole wiki from a backup

I've put it in a shell script:

#!/bin/bash
 
WEBDIR=/var/www/html/dokuwiki/
 
SERVERDIR=/var/www/html/dokuwiki/
 
SERVER=gm4slv.org.uk
 
 
sudo  rsync -e "ssh -l gm4slv -i /home/gm4slv/.ssh/id_rsa"  -av $SERVER:$SERVERDIR $WEBDIR

This means I can automate the mirroring with crontab of I wanted to, but it would mean the sandbox will lose any local modifications I've done. Perhaps it's best to keep the option to revert to production version as something I do from time to time, rather then automatically.

(UPDATE — John Pumford-Green 30/05/22 19:37 )

Encrypted Password Plugin…. see Sandbox Server

Page Info

John Pumford-Green 30/05/22 13:37

Page last updated: 27/04/23 08:33 BST

public/computers/dokuwiki_mirror.txt · Last modified: 27/04/23 08:33 BST by 127.0.0.1