Renaming heirarchies from the bottom

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

 



A common scenario when we are moving users between partitions is to  
want to move their archived mail first, because there's less risk of  
disrupting them, and then their top-level mailbox last.

So we want to do:

rename --partition new-partition user.name.box user.name.box

and then later

rename --partition new-partition user.name user.name

The second step gives the error message ``mailbox already exists'',  
but nonetheless performs the move.  I presume the error comes after  
user.name has been moved, when it then attempts to recurse down into  
the subdirs that have already been moved.

Is this safe to do?

ian

mailhost-new# cyradm --user=mailadm localhost
Password:
localhost> cm user.testcase
localhost> cm user.testcase.subdir
localhost> info user.testcase.subdir
{user.testcase.subdir}:
   condstore: false
   lastpop:
   lastupdate: 12-Nov-2007 11:32:19 +0000
   partition: partition9
   size: 0
localhost> info user.testcase
{user.testcase}:
   condstore: false
   lastpop:
   lastupdate: 12-Nov-2007 11:32:13 +0000
   partition: partition9
   size: 0
localhost> rename --partition partition8  user.testcase.subdir  
user.testcase.subdir
localhost>  info user.testcase.subdir
{user.testcase.subdir}:
   condstore: false
   lastpop:
   lastupdate: 12-Nov-2007 11:33:14 +0000
   partition: partition8
   size: 0
localhost> info user.testcase
{user.testcase}:
   condstore: false
   lastpop:
   lastupdate: 12-Nov-2007 11:32:13 +0000
   partition: partition9
   size: 0
localhost> rename --partition partition8 user.testcase user.testcase

renamemailbox: Mailbox already exists
localhost> info user.testcase
{user.testcase}:
   condstore: false
   lastpop:
   lastupdate: 12-Nov-2007 11:34:19 +0000
   partition: partition8
   size: 0
localhost>

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