Previously, we have discussed how to scale the Zimbra Collaboration Suite Open-Source Edition. New mail storage can be added without stopping the infrastructure on which Zimbra is deployed. This capability is highly valued by SaaS providers who offer their clients access to the Zimbra Collaboration Suite on a commercial basis. However, this scaling process is not without its drawbacks. The fact is that when creating a new account in the free version of Zimbra, it becomes tightly linked to the mail storage where it was created, and transferring it to another server using Zimbra OSE's built-in tools proves to be unsafe and quite labor-intensive. However, transferring mailboxes is not always related to horizontal scaling. For example, SaaS providers may use account transfers to more powerful servers in cases where their clients change their tariff plans. Additionally, account transfers may be necessary for large organizations during restructuring.

A powerful tool for transferring mail accounts between servers is Zextras PowerStore, which is part of the modular extensions suite . Thanks to the team doMailboxMove, this extension allows you to transfer not only individual accounts but also entire domains to other mail storage quickly and easily. Let's take a closer look at how it works and in what cases its use will yield the maximum effect.
For example, let’s take a company that started in a small office space but later grew into a medium enterprise with several hundred employees. Right from the beginning, the company implemented the Zimbra Collaboration Suite Open-Source Edition. This free and relatively low-resource solution for collaboration was ideal for the startup company. However, after the number of employees dramatically increased, the server struggled to handle the load and began to slow down. To resolve this issue, management allocated funds to acquire a new mail storage system to host some accounts. However, simply connecting a second storage did not solve anything, as all created accounts remained on the old server, which could not handle their number.
The Zimbra Collaboration Suite is designed such that the speed of reading and writing to the storage device plays a crucial role in its performance, which means that simply increasing the server's computational power will not double Zimbra's performance. In other words, two servers with 4-core processors and 32 gigabytes of RAM will show much better performance than one server with an 8-core processor and 64 gigabytes of RAM.
To address this issue, the system administrator utilized Zextras' solution. With a command such as zxsuite powerstore doMailboxMove mail2.company.com accounts user@company.com stages data,account the administrator sequentially transfers the last one hundred created accounts to the new storage. After completing this process, the load on the old server significantly decreased, and work in Zimbra became comfortable and pleasant for users once again.
Let's consider another scenario: a small company uses a SaaS provider to access Zimbra under a multi-tenant model. The company has its own plan, access to account administration, and so on. However, soon the company wins a large tender and significantly increases its staff. Consequently, the importance of the collaboration system rises. The ability to use the address book, organize instant communication between employees, and coordinate actions using calendars and daily planners becomes extremely important when implementing large projects. In this situation, with a lack of time, migrating to its own Zimbra infrastructure is not feasible. Therefore, the management decides to enter into a new agreement with its SaaS provider, which will include a stricter SLA and, consequently, a higher cost of services.
The SaaS provider, in turn, has several storage systems used to service clients on different plans. In addition to SLA, servers for cheaper plans may be equipped with slower HDDs, backed up less frequently, and may not have the capability to synchronize account data with mobile devices. A significant difference is also the period during which the SaaS provider retains client data after the subscription ends. Therefore, after signing the contract, the system administrator of the SaaS provider needs to transfer the data of all the company accounts to a new, more fault-tolerant and high-performance email storage that will guarantee the client a high SLA.
To transfer the mailboxes, the administrator will need some time, and predicting how long the process will take is quite difficult. To complete the transfer within a 15-minute technical break, the administrator decides to carry out the mailbox transfer in two stages. In the first stage, he will copy all user data to the new server, and in the second stage, he will transfer the accounts themselves. To execute the first stage, he runs the command zxsuite powerstore doMailboxMove secureserver.saas.com domains company.ru stages dataThis ensures that all account data from the company's domain will be safely transferred to a new secure server. The copying process is incremental, so when the final transfer of accounts to the new server occurs, only the data that has appeared since the first copy will be copied. At the time of the technical pause, the system administrator only needs to enter the command zxsuite powerstore doMailboxMove secureserver.saas.com domains company.ru stages data,account notifications admin@saas.comThis will complete the domain transfer process to the new server. Additionally, immediately after the completion of this command, a notification about its completion will be sent to the administrator's email, allowing them to inform the client about the successful transition to a more efficient and reliable server.
However, it should be noted that backup copies of the transferred mailboxes remain on the old server. The SaaS provider is not interested in storing them on the old server, and therefore the administrator decides to delete them. They do this using the command zxsuite powerstore doPurgeMailboxes ignore_retention trueWith this command, all backup copies of the mailboxes transferred to the new server will be instantly removed from the old server.
Thus, as we have seen, Zextras PowerStore provides Zimbra administrators with virtually unlimited capabilities for managing mailboxes, allowing not only for horizontal scaling but also for solving certain business tasks. Furthermore, moving mailboxes between storage can be used to enhance the security of the Zimbra mail storage upgrade process, but this topic deserves a separate article.
Source: habr.com
