* CULL command (replaces db_archive)
authorArt Cancro <ajc@citadel.org>
Wed, 22 Jun 2005 03:59:55 +0000 (03:59 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 22 Jun 2005 03:59:55 +0000 (03:59 +0000)
citadel/database_sleepycat.c
citadel/docs/citadel.html

index a108e1fe76c92b8f1e8c4288b049e06a345e64e4..39912dae2011b97fd71daf8a60f8a48b492d3fd6 100644 (file)
@@ -255,6 +255,15 @@ static void cdb_cull_logs(void)
        }
 }
 
+/*
+ * Manually initiate log file cull.
+ */
+void cmd_cull(char *argbuf) {
+       if (CtdlAccessCheck(ac_internal)) return;
+       cdb_cull_logs();
+       cprintf("%d Database log file cull completed.\n", CIT_OK);
+}
+
 
 /*
  * Request a checkpoint of the database.
@@ -449,6 +458,8 @@ void open_databases(void)
        }
 
        lprintf(CTDL_DEBUG, "cdb_*: open_databases() finished\n");
+
+       CtdlRegisterProtoHook(cmd_cull, "CULL", "Cull database logs");
 }
 
 
index e197c042b83f4d2f3899110b46a2c7bb42a83b4c..b05698e08a0479221e9d8646d74ba5e67f810158 100644 (file)
@@ -2275,8 +2275,7 @@ alphabetical and on-disk ordering of the <span
   <li>After verifying that your backup completed successfully, delete
 the committed log files with a command like this:</li>
 </ol>
-<span style="font-family: monospace;">db_archive -d -h
-/usr/local/citadel/data</span><br>
+<span style="font-family: monospace;">/usr/local/citadel/sendcommand &quot;CULL&quot;</span><br>
 <br>
 <span style="font-style: italic;">Advantage:</span> Citadel continues
 to run normally during backups.<span style="font-style: italic;"><br>