summaryrefslogtreecommitdiffstats
path: root/abs/core/LinHES-system/bin/rollback.sh
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/LinHES-system/bin/rollback.sh')
-rwxr-xr-xabs/core/LinHES-system/bin/rollback.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/abs/core/LinHES-system/bin/rollback.sh b/abs/core/LinHES-system/bin/rollback.sh
new file mode 100755
index 0000000..12897da
--- /dev/null
+++ b/abs/core/LinHES-system/bin/rollback.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+#----------------------------------------------------------------------------
+. /usr/LH/bin/backupcommon || {
+ echo 1>&2 "Can not load common settings!"
+ exit 1
+}
+#----------------------------------------------------------------------------
+
+require file+r+x $MYTHSHUTDOWN
+
+# Prevent mythshutdown from shutting down the system in the middle...
+lock_myth
+
+echo "Starting rollback of old backups"
+backup_roller '' .1 .2 .3 .4 .5 .6 .7 .8 .9 .10 .11 .12 .13 .14 .15 .16 .17 .18 .19
+echo "Rollback completed."
+
+# Unlock the system again...
+unlock_myth