This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
build:backups [2008/03/04 00:58] 24.107.98.225 Wiki data does get backed up daily. (CMB) |
build:backups [2010/07/18 16:51] (current) SLUUG Administration |
||
---|---|---|---|
Line 99: | Line 99: | ||
We do have a backup procedure for the wiki content. The ''/etc/cron.daily/backup-dokuwiki'' script copies a backup of the wiki data files to ''/var/backups/web/''. | We do have a backup procedure for the wiki content. The ''/etc/cron.daily/backup-dokuwiki'' script copies a backup of the wiki data files to ''/var/backups/web/''. | ||
+ | <code /etc/cron.daily/backup-dokuwiki> | ||
+ | #!/bin/sh | ||
+ | |||
+ | DATE=`date +'%Y%m%d'` | ||
+ | BACKUPDIR=/var/backups/web | ||
+ | EXCLUDE='data/cache/*' | ||
+ | INCLUDE='data/ conf/' | ||
+ | WIKIDIR=/srv/www/wiki.sluug.org/public | ||
+ | |||
+ | tar cfz $BACKUPDIR/wikidata-$DATE.tgz -C $WIKIDIR --exclude="$EXCLUDE" $INCLUDE | ||
+ | |||
+ | </code> | ||
+ | |||
+ | This tars all other vhosts in /srv/www | ||
+ | |||
+ | <code /etc/cron.daily/backup-www> | ||
+ | #!/bin/sh | ||
+ | |||
+ | SRCDIR=/srv/www | ||
+ | BACKUPDIR=/var/backups/web | ||
+ | EXCLUDE='wiki.sluug.org/* wordpress*' | ||
+ | DATE=`date +'%Y%m%d'` | ||
+ | |||
+ | tar cfz $BACKUPDIR/www-$DATE.tgz -P $SRCDIR --exclude="$EXCLUDE" | ||
+ | </code> | ||
==== Backup of Email ==== | ==== Backup of Email ==== |