Skip to content

Commit

Permalink
Erste, funktionierende Version des Backups.
Browse files Browse the repository at this point in the history
  • Loading branch information
pklaus committed Jun 7, 2011
0 parents commit 9aa7fb2
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
studienfuehrer-*
dumpgenerator.py
.DS_Store
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
all:
./backup.sh > studienfuehrer-last-backup.log
33 changes: 33 additions & 0 deletions backup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

# ### About this script
# Dieses Script dient dem Zweck, die Inhalte des Studienführers Physik der ZaPF zu sichern.
# Die Internetseite des Studienführers ist <http://studienführer-physik.de>.
# Dazu wird ein Skript des Projekts wikiteam genutzt, das automatisch alle Inhalte sichert.
#
# ### Author
# Philipp Klaus <philipp.klaus →AT→ gmail.com>
#
# ### Links / Quellen
# * How to backup without access to the wiki server: <http://code.google.com/p/wikiteam/wiki/FAQ>

## zum debuggen diese Zeile einkommentieren:
#set -x

## ----- Konfiguration:
BASE_URL="https://www.fs-maphy.uni-hannover.de"
#EXPORT_URL=$BASE_URL"/w/index.php5?title=Spezial:Exportieren"
API_URL=$BASE_URL"/w/api.php"
BACKUP_FOLDER="studienfuehrer-$(date +%Y-%m-%d)"
DUMPGENERATOR_TOOL_URL="http://wikiteam.googlecode.com/svn/trunk/dumpgenerator.py"
DUMPGENERATOR_TOOL="dumpgenerator.py"

## ----- Befehle:
#svn checkout http://wikiteam.googlecode.com/svn/trunk/ wikiteam
#wget $DUMGENERATOR_TOOL_URL
curl -C - -O $DUMPGENERATOR_TOOL_URL
## Hier passiert die eigentliche Arbeit, das Backup des Wikis:
python $DUMPGENERATOR_TOOL --api=$API_URL --xml --images --logs --path=$BACKUP_FOLDER
tar czvf $BACKUP_FOLDER.tar.gz $BACKUP_FOLDER/*
## Nach dem erstellen der gepackten Datei können wir den Ordner löschen:
rm -rf $BACKUP_FOLDER

0 comments on commit 9aa7fb2

Please sign in to comment.