====== Backing up DokuWiki ======
This is how I backup my DokuWiki:
* backup-dokuwiki.sh
#!/bin/bash
name=$GOOGLE_DRIVE_DIRECTORY/$(date -Is).tar.xz
sudo tar cJf ${name} /var/lib/dokuwiki
drive push -no-prompt ${name}
rm -rf ${name}
Add the following into crontab:
0 4 * * * $HOME/bin/backup-dokuwiki.sh 2>&1
I get the the following email everyday:
Return-path:
Envelope-to: A_CERTAIN_USER@fangfufu.co.uk
Delivery-date: Mon, 25 Jul 2016 04:10:57 +0100
Received: from A_CERTAIN_USER by gabriel.fangfufu.co.uk with local (Exim 4.87)
(envelope-from )
id 1bRWID-0005xV-Ca
for A_CERTAIN_USER@fangfufu.co.uk; Mon, 25 Jul 2016 04:10:57 +0100
From: root@fangfufu.co.uk (Cron Daemon)
To: A_CERTAIN_USER@fangfufu.co.uk
Subject: Cron /home/A_CERTAIN_USER/bin/backup-dokuwiki.sh 2>&1
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
X-Cron-Env:
Message-Id:
Date: Mon, 25 Jul 2016 04:10:57 +0100
tar: Removing leading `/' from member names
Resolving...