From 866c60601dca5d4462d49208d8f8b067fe9f5423 Mon Sep 17 00:00:00 2001
From: Per Cederqvist <ceder@lysator.liu.se>
Date: Thu, 25 Jan 2007 20:58:43 +0000
Subject: [PATCH] Back up more often.

* backup-repeatedly: Don't sleep between backups.  Print number of
  cycles completed.  Don't retry backups with warnings, as that takes
  too much time.
---
 ChangeLog         |  5 +++++
 backup-repeatedly | 19 +++++++++++--------
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index a9cfd4f..fcb7fcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-01-25  Per Cederqvist  <ceder@sedesopim.lysator.liu.se>
 
+	Back up more often.
+	* backup-repeatedly: Don't sleep between backups.  Print number of
+	cycles completed.  Don't retry backups with warnings, as that
+	takes too much time.
+
 	Back up the entire datorhandbok system.
 	* fetch-backup-work: Back up kilauea:/boot.
 
diff --git a/backup-repeatedly b/backup-repeatedly
index 230b56f..ff34a7b 100755
--- a/backup-repeatedly
+++ b/backup-repeatedly
@@ -1,36 +1,39 @@
 #!/bin/sh
+ctr=0
 while :
 do
+  ctr=`expr $ctr + 1`
   [ -f /nobackup/backup.lysator/etc/finish ] && break
   [ -f /nobackup/backup.lysator/etc/stop ] && break
 
   echo
-  echo Running all jobs.
+  echo Running all jobs.  Repeat count: $ctr.
   echo
-  /nobackup/backup.lysator/bin/backup-all 0 1
+  /nobackup/backup.lysator/bin/backup-all $@
 
   [ -f /nobackup/backup.lysator/etc/finish ] && break
   [ -f /nobackup/backup.lysator/etc/stop ] && break
 
   echo
-  echo Retrying failed jobs.
+  echo Retrying failed jobs.  Repeat count: $ctr.
   echo
-  /nobackup/backup.lysator/bin/backup-all --failed 0 1
+  /nobackup/backup.lysator/bin/backup-all --failed $@
 
   [ -f /nobackup/backup.lysator/etc/finish ] && break
   [ -f /nobackup/backup.lysator/etc/stop ] && break
 
   echo
-  echo Retrying jobs with warnings.
+  echo Retrying jobs with warnings.  Repeat count: $ctr.
   echo
-  /nobackup/backup.lysator/bin/backup-all --retry 0 1
+  # This takes too much time...
+  # /nobackup/backup.lysator/bin/backup-all --retry $@
 
   [ -f /nobackup/backup.lysator/etc/finish ] && break
   [ -f /nobackup/backup.lysator/etc/stop ] && break
 
   echo
-  echo Sleeping one hour.
+  echo Sleeping one minute.  Repeat count: $ctr.
   echo
-  sleep 3600
+  sleep 60
 
 done
-- 
GitLab