tools/migrate-metadata problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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";

----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux