Differences

This shows you the differences between two versions of the page.

Link to this comparison view

public:backing_up_dokuwiki [2018/03/31 00:38] (current)
Line 1: Line 1:
 +====== Backing up DokuWiki ======
 +This is how I backup my DokuWiki: ​
 +  * backup-dokuwiki.sh
 +<code bash>
 +#!/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}
 +</​code>​
 +
 +Add the following into crontab: ​
 +<​code>​
 +0       ​4 ​      ​* ​      ​* ​      ​* ​      ​$HOME/​bin/​backup-dokuwiki.sh 2>&1
 +</​code>​
 +
 +I get the the following email everyday:
 +<​code>​
 +Return-path:​ <​A_CERTAIN_USER@fangfufu.co.uk>​
 +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 <​A_CERTAIN_USER@fangfufu.co.uk>​)
 +        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 <​A_CERTAIN_USER@gabriel>​ /​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: <​PATH=/​home/​A_CERTAIN_USER/​go-path/​bin:/​home/​A_CERTAIN_USER/​bin:/​usr/​local/​bin:/​usr/​bin:/​bin:/​usr/​local/​games:/​usr/​games>​
 +X-Cron-Env: <​SHELL=/​bin/​sh>​
 +X-Cron-Env: <​HOME=/​home/​A_CERTAIN_USER>​
 +X-Cron-Env: <​LOGNAME=A_CERTAIN_USER>​
 +Message-Id: <​E1bRWID-0005xV-Ca@gabriel.fangfufu.co.uk>​
 +Date: Mon, 25 Jul 2016 04:10:57 +0100
 +
 +tar: Removing leading `/' from member names
 +Resolving...
 +</​code>​
  
  • public/backing_up_dokuwiki.txt
  • Last modified: 2018/03/31 00:38
  • (external edit)