-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Erste, funktionierende Version des Backups.
- Loading branch information
0 parents
commit 9aa7fb2
Showing
3 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
studienfuehrer-* | ||
dumpgenerator.py | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
all: | ||
./backup.sh > studienfuehrer-last-backup.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |