moving mailboxes between partitions

Aidan Evans ae at is.dal.ca
Wed Sep 18 12:49:19 EDT 2002


On Wed, 18 Sep 2002 at 16:10 Andreas Piesk wrote to info-cyrus at lists.andrew...

>hiho,
>
>i want to move mailboxes from 4 different partitions into one.
>AFAIR i have to use the cyradm-command 'rename':
>
>rename user.name1 user.name1 newpartition
>
>it works so far, on a testserver.
>before i run the prepared scripts on the productionserver with approx.
>8800 mailboxes i think asking the gurus might be a good idea :)
>
>is the 'rename'-method safe? did anyone such an operation before (hardly
>to believe that i'm the first:). should i slowdown the script or could
>it running at full speed? must i run a reconstruct afterwards?

  We have moved numerous mailboxes across partitions without any apparent
data loss.  However, we have encountered some issues.  This is with Cyrus
2.1.9.

  Mail disk space quotas are messed up.  Generally the user ends up with
usage recorded as twice the real amount.  This is okay for a while as long
as users are not already using more than half their limit (then their mail
gets queued).  Running "quota -f" cures this.  Reading the code of the
quota program leads me to believe that it is best to do this at a non-busy
time.  A comment says "Lock mailbox list to prevent mailbox
creation/deletion during the fix".

  If a user is logged in while their mailbox is being moved they find that
folders seem to be empty.  Restarting the client brings things back into
sync.  I assume locking ensures that the user can't change a folder during
the move (nor can mail be delivered), but the imapd they're connected to
probably ends up looking in the wrong place for a folder that was moved.

  This probably has no adverse consequences, but the file modification date
on all the moved message files gets changed to the time of the move.  I'd
like it to be preserved, as with "cp -p", but that's just my aesthetics.

Aidan Evans | Networks & Systems, University Computing & Information Services
494-3332    | Please send requests to the ticket system: ucis-systems at dal.ca






More information about the Info-cyrus mailing list