Feature request: Add wildcard capabilities to cyradm's xfer command or make it handle public namespaces reasonably
lists at binarus.de
Sun Dec 16 04:38:53 EST 2018
yesterday, I have retired a server running 2.4.16 and have transferred the folder structure and all messages to a new server running 2.5.10.
In the past, I have used imapsync to do that sort of transfers, which worked reliably. But this time, I decided to prefer an "original vendor tool"; hence, I used cyradm and its xfer command.
After having fiddled around with the configuration files on the old and the new server, I could move the user mailboxes without any problem (all mailboxes whose name begins with "user."). This process went smoothly and worked reasonably fast, and (the most important thing for me) all subfolders in each mailbox have been moved recursively.
I don't have too many users / mailboxes, but a huge and well-crafted (in terms of folder structure and permissions) public folder (namespace) which is an important collaboration tool. It did not seem possible to relocate the public folder in a reasonable manner using cyradm's xfer command. Obviously, it is able to relocate a single folder from one public namespace to another, but it does not relocate this folder's subfolders.
Unfortunately, in contrast to some other of cyradm's commands, xfer does not seem to support wildcards either.
This was the moment when I thought about stopping using cyradm for this task and using imapsync again. But I am a bit stubborn sometimes, so I went on and ended up with manually moving several thousands of folders (actually, it was semi-automatic: from within cyradm, I issued an lm command, copied a part of the listing from the terminal window into a text editor, generated the respective commands there (using macros within the editor), pasted the commands back into the terminal window, waited until it had finished, and restarted that process).
This is ugly and silly.
Hence the question:
Could we extend cyradm's xfer command so that we could give wildcards to it, like, for example, cyradm's lm command? Or (more elegant and desirable) so that it recursively includes all subfolders when it relocates a folder, even when this folder is in the public namespace?
Thank you very much for any thoughts,
P.S. Please see my next messages for reasons why I didn't write a Perl script using Cyrus::IMAP:Admin for this task.
More information about the Info-cyrus