source $APP_BASE/lib/hydra/misc
source $APP_BASE/lib/hydra/usage
source $APP_BASE/lib/hydra/action
+source $APP_BASE/lib/hydra/backup
source $APP_BASE/lib/hydra/config
source $APP_BASE/lib/hydra/tmpfile
--- /dev/null
+#!/bin/bash
+#
+# Backup restoration.
+#
+
+# Load.
+source $APP_BASE/lib/hydra/functions || exit 1
+hydra_config_load
+
+hydra_backup_environment $*
+duplicity restore file:///$BACKUPDIR/ $RESTOREDIR/
#
# TODO: put on $SITES/backups/site/$SITE, with htaccess and correct
# ownership/permission.
+# TODO: optionally backup database before packing
# Arguments
SITES="/var/sites"
--- /dev/null
+#!/bin/bash
+#
+# Restore a website from backup
+#
+
+# Load.
+source $APP_BASE/lib/hydra/functions || exit 1
+hydra_config_load
+
+SITE="$3"
+
+if [ -z "$SITE" ]; then
+ hydra_action_usage
+ exit 1
+fi
+
+hydra_backup_environment $*
+
+# Check if there's already a site folder and backup it
+# Check installed platforms: trac, drupal, pmwiki
+# Drupal: check symlinks
+# Fix permissions