summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/backup-restore-site15
1 files changed, 14 insertions, 1 deletions
diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site
index dddc3c0..81de76d 100755
--- a/share/hydractl/backup-restore-site
+++ b/share/hydractl/backup-restore-site
@@ -2,7 +2,7 @@
#
# Restore a website from backup
#
-# TODO: moin, ikiwiki, etc
+# TODO: moin
# Load.
source $APP_BASE/lib/hydra/functions || exit 1
@@ -100,3 +100,16 @@ if [ -f "$RESTOREDIR/var/backups/mysql/sqldump/$SITE.sql.gz" ]; then
else
echo "Databases should be manually restored"
fi
+
+# Ikiwiki
+if [ -e "$FOLDER/ikiwiki" ]; then
+ echo "Restoring ikiwiki for $SITE..."
+ file="/etc/ikiwiki/$SITE.setup"
+ if [ -e "$file" ] && [ -e "/var/git/repositories/$SITE" ]; then
+ site="`basename $file .setup`"
+ git clone file:///var/git/repositories/$SITE /var/sites/$SITE/ikiwiki_src
+ ikiwiki --setup $file --rebuild
+ else
+ echo "Either $file or git repository not found for $SITE ikiwiki instance"
+ fi
+fi