From 052d7ce9e6882932ab8f309d2ede471b3f4b6c1c Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Fri, 24 Apr 2009 02:09:30 +0000 Subject: [PATCH] * Added a subcommand to the migrator to list out all of the directories which require copying because they are not part of the database; these can be fed into rsync to supplement the XML dump and build a complete replica of a Citadel installation. --- citadel/citadel_dirs.c | 2 -- citadel/modules/migrate/serv_migrate.c | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/citadel/citadel_dirs.c b/citadel/citadel_dirs.c index 770ee0d5b..6aa74959b 100644 --- a/citadel/citadel_dirs.c +++ b/citadel/citadel_dirs.c @@ -1,5 +1,3 @@ -#include "sysdep.h" -#include #include #include #include diff --git a/citadel/modules/migrate/serv_migrate.c b/citadel/modules/migrate/serv_migrate.c index b440ff3b4..4857f96f6 100644 --- a/citadel/modules/migrate/serv_migrate.c +++ b/citadel/modules/migrate/serv_migrate.c @@ -896,6 +896,23 @@ void migr_do_import(void) { +/* + * Dump out the pathnames of directories which can be copied "as is" + */ +void migr_do_listdirs(void) { + cprintf("%d Don't forget these:\n", LISTING_FOLLOWS); + cprintf("bio|%s\n", ctdl_bio_dir); + cprintf("files|%s\n", ctdl_file_dir); + cprintf("userpics|%s\n", ctdl_usrpic_dir); + cprintf("messages|%s\n", ctdl_message_dir); + cprintf("netconfigs|%s\n", ctdl_netcfg_dir); + cprintf("keys|%s\n", ctdl_key_dir); + cprintf("images|%s\n", ctdl_image_dir); + cprintf("info|%s\n", ctdl_info_dir); + cprintf("000\n"); +} + + /* * Common code appears in this section */ @@ -918,6 +935,9 @@ void cmd_migr(char *cmdbuf) { else if (!strcasecmp(cmd, "import")) { migr_do_import(); } + else if (!strcasecmp(cmd, "listdirs")) { + migr_do_listdirs(); + } else { cprintf("%d illegal command\n", ERROR + ILLEGAL_VALUE); } -- 2.30.2