tools/migrate-metadata problem

Andy Fiddaman cyrus at fiddaman.net
Fri Oct 5 10:09:42 EDT 2007


I've just migrated my metadata files to a separate partition on faster
disks and had a problem with the migrate-metadata script. I use
virtdomains and when the script processes directories it skips any
containing a dot. Since all of my domain directories contain a dot, none
of them were processed.

I made this change to get it to work (this is with 2.3.9), it could be
done in one match, this was just a quick fix.

--- cyrus-imapd-2.3.9/tools/migrate-metadata    2006-11-30
17:11:25.000000000 +0000
+++ cyrus-imapd-2.3.9/tools/migrate-metadata.new        2007-10-05
14:06:54.842848647 +0000
@@ -160,7 +160,7 @@
          ouch "couldn't delete $part$subpath";
        }
    }
-   elsif ($subdir =~ /^[^\.]+$/s) {
+   elsif (-d "$part$subpath" && $subdir !~ /^./ && $subdir !~ /\.$/) {
        # no dot in name, so this is a subdir, process it
        mkdir($mpart . $subpath, 0700) ||
      ouch "couldn't create $mpart$subpath";



More information about the Info-cyrus mailing list