wilde: utils/admin save-annotations.sh, 1.1, 1.2 save-annotations.README, 1.1, 1.2

cvs at intevation.de cvs at intevation.de
Wed Mar 29 13:29:04 CEST 2006


Author: wilde

Update of /kolabrepository/utils/admin
In directory doto:/tmp/cvs-serv17879

Modified Files:
	save-annotations.sh save-annotations.README 
Log Message:
Modified save-annotations.sh to use validate-skiplist.
Updated save-annotations.README accordingly.


Index: save-annotations.sh
===================================================================
RCS file: /kolabrepository/utils/admin/save-annotations.sh,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- save-annotations.sh	24 Jan 2006 10:36:39 -0000	1.1
+++ save-annotations.sh	29 Mar 2006 11:29:02 -0000	1.2
@@ -13,6 +13,7 @@
 # Description:
 
 # Backup and check annotations db.
+# The checks are done using validate-skiplist
 
 # As the kolab/cyrus-imap annotations.db tends to break on a regular
 # basis, this script should be setup as a cronjob.
@@ -48,7 +49,7 @@
 USER=kolab-r
 
 # Used Binaries:
-CVT_CYRUSDB=/kolab/bin/cvt_cyrusdb
+CHECK_CYRUSDB=/kolab/bin/validate-skiplist
 
 # Command used:
 # - to copy annotations.db to backup
@@ -63,7 +64,7 @@
 # -------------------------------------------------------------------
 # Nothing to configure past this point...
 
-BACKUP_FILE="${BACKUP_DIR}/annotations.db-`date +%Y%m%d-%H:%M:%S`"
+BACKUP_FILE="${BACKUP_DIR}/annotations.db-`date +%Y%m%d-%H%M%S`"
 
 # Change identity if necessary
 if [ `whoami` != "$USER" ] ; then
@@ -106,11 +107,7 @@
 
 check-backup()
 {
-  temp_file="${BACKUP_DIR}/.tempflatdb"
-  # beware this takes a few seconds!
-  $CVT_CYRUSDB "$BACKUP_FILE" skiplist \
-    "$temp_file" flat >/dev/null 2>&1 && \
-    rm $temp_file
+  $CHECK_CYRUSDB "$BACKUP_FILE" >/dev/null 2>&1
 }
 
 compress-backup()

Index: save-annotations.README
===================================================================
RCS file: /kolabrepository/utils/admin/save-annotations.README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- save-annotations.README	24 Jan 2006 11:02:09 -0000	1.1
+++ save-annotations.README	29 Mar 2006 11:29:02 -0000	1.2
@@ -13,6 +13,19 @@
 mails even when the kolab-server fails!
 
 
+Prerequisites
+-------------
+
+validate-skiplist must be installed:
+
+- Build it from the included source file:
+  gcc -O2 validate-skiplist.c -o validate-skiplist
+
+- Copy (as root) validate-skiplist anywhere you like.  The default
+  configuration of save-annotations.sh expects it in /kolab/bin: 
+  cp validate-skiplist /kolab/bin
+
+
 Installation
 ------------
 





More information about the commits mailing list