From 5880bf57e66b1e9474e367c085260a0503e5bdc2 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 22 Jun 2005 03:59:55 +0000 Subject: [PATCH] * CULL command (replaces db_archive) --- citadel/database_sleepycat.c | 11 +++++++++++ citadel/docs/citadel.html | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/citadel/database_sleepycat.c b/citadel/database_sleepycat.c index a108e1fe7..39912dae2 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -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"); } diff --git a/citadel/docs/citadel.html b/citadel/docs/citadel.html index e197c042b..b05698e08 100644 --- a/citadel/docs/citadel.html +++ b/citadel/docs/citadel.html @@ -2275,8 +2275,7 @@ alphabetical and on-disk ordering of the After verifying that your backup completed successfully, delete the committed log files with a command like this: -db_archive -d -h -/usr/local/citadel/data
+/usr/local/citadel/sendcommand "CULL"

Advantage: Citadel continues to run normally during backups.
-- 2.39.2