- // "migrate mode" means we just start the server and then run ctdlmigrate interactively.
- if (migrate_mode) {
- citserver_pid = start_citadel();
- fprintf(stderr, "ctdlvisor: waiting a moment for citserver to initialize...\n");
- sleep(5);
- char bin[1024];
- sprintf(bin, "/usr/local/citadel/ctdlmigrate -h %s", CTDL_DIR);
+ // "export mode" means we only run ctdldump
+ if (export_mode) {
+ sprintf(bin, "/usr/local/citadel/ctdldump -y -h %s", CTDL_DIR);
+ system(bin);
+ }
+
+ // "import mode" means we only run ctdlload
+ if (export_mode) {
+ sprintf(bin, "/usr/local/citadel/ctdlload -y -h %s", CTDL_DIR);