tools/migrate-metadata problem

Rudy Gevaert Rudy.Gevaert at UGent.be
Mon Oct 8 10:51:00 EDT 2007


Hello,



Andy Fiddaman wrote:
> 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 !~ /\.$/) {

I tried your patch and it doesn't really recurse here.  It does recurse 
if I match on subdir !~ /^\./  You are matching on every character at 
the beginning of the line.

An other problem is that it copies other directories too, depending on 
what your are matching.  (That is not your fault ) E.g.  The socket 
directory where the lmtp socket resides.

It think it is difficult to make a definite list of al case, depending 
if one is using virtual domains, what seperator, ...

I've attached a patch that solves my case :)


-- 
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Rudy Gevaert          Rudy.Gevaert at UGent.be          tel:+32 9 264 4734
Directie ICT, afd. Infrastructuur ICT Department, Infrastructure office
Groep Systemen                    Systems group
Universiteit Gent                 Ghent University
Krijgslaan 281, gebouw S9, 9000 Gent, Belgie               www.UGent.be
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch
Url: http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20071008/1ef259b1/attachment.ksh 


More information about the Info-cyrus mailing list