Re: Is it possible to migrate a single mailbox from cyrus 3.4.3 to 3.6.0~beta2-1 storage?

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

 



On 3/28/22 09:55, fr.hamelin+cyrus@xxxxxxxxx wrote:
Dear Andy,
I'm waiting that the package is making its way do debian/bookworm, then I will try to relocate_by_id my subfolder to the uuid of my user.

I'm watching closely what your are doing.
I have already question:
knowing that I have cp all the content of /var/spool/cyrus/mail/f/fuser to /var/spool/cyrus/mail/uuid/x/9/x9<blala>/ and that I can see my mails in my inbox but I don't see any other mailfolders, should I delete everything under uuid (how should I do that?) and reelocate_by_id?


I have not deleted anything in the .../uuid/ directory.

And since I haven't been able to use relocate_by_id yet, I used the process below suggested by Ellie in an earlier email to create mailboxes and subfolders and move the mail to the new uuid storage.

1. First, manually create the user's full hierarchy in uuid storage (using cyradm or similar), like:

createmailbox user/foo
createmailbox user/foo/Drafts
createmailbox user/foo/Trash
createmailbox user/foo/Sent
createmailbox user/foo/whatever
createmailbox user/foo/whatever/else

and so on.

At first I used cyradm for everything, but I found it was faster to only create the user/foo with cyradm and then log in with a good mail client like Thunderbird to create the mail folders and subfolders.

2. Now, on the filesystem, you'll have a bunch of new .../uuid/././.../ directories, one for each of those mailboxes and subfolders you just created. Use mbpath to tell you which is which.

You MUST use mbpath to find the uuid directory for the main user mailbox AND every folder and sub-folder. So this takes some time and you have to save the results to use in step 3.

3. Then (carefully) copy the files from each old mailbox storage directory to its corresponding new uuid one.

You MUST this as the user that cyrus runs as OR you have to go back and fix the file ownership later. On our servers the cyrus user runs Cyrus. So I copied the files using 'sudo -u cyrus cp ...' so that the email file ownership and permissions were the same as in the old storage.

4. Finally, a recursive reconstruct of the user should then find everything. This was the easy step because you only have to run it once for a user.

Hope you can use relocate_by_id and don't have to do this manually using the above steps.

--
Andy


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T9d294f89a3d1d260-M2f194782b7c5b5b01e200409
Delivery options: https://cyrus.topicbox.com/groups/info/subscription




[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