We hope you read the first article which is about Zimbra to Carbonio CE migration using imapsync method. From the first article, you already understood that migration can be easy and simple if you understand the process.
Using this method you can migrate your email data including contacts and calendar from Zimbra server to Carbonio CE.
How are we going to do it?
Let me give you a graphical overview of how this method works:
To Summarize the steps:
- We extract user data (account details) and transfer them to Carbonio CE server.
- Then we import the transferred data to Carbonio CE server.
- We modify DNS record (MX) to make Carbonio CE server active.
- Now we again export email data from Zimbra Server to Carbonio CE server and Import them.
Benefits of this method
The main benefit of this migration method is you are get to migrate not only user email data but also contacts and calendar data of all respective user.
Important Note:
The process of transferring and importing old data can increase system load in Carbonio CE server significantly. So you can transfer/import old data in a small chunk without putting much load on the Carbonio CE server OR you can take a server migration downtime window to complete this step.
As this method involves data export import process on both Zimbra & Carbonio CE server, make sure you have enough space in the server or you use external storage to store temporary data.
Migration steps
On Zimbra server, check the service status before starting the migration process:
Step-1
zimbra@mail:~$ zmcontrol -v
Release 8.8.15.GA.4179.UBUNTU20.64 UBUNTU20_64 FOSS edition, Patch 8.8.15_P39.
zimbra@mail:~$
zimbra@mail:~$ zmcontrol status
Host mail.testdomain1.com
amavis Running
antispam Running
antivirus Running
dnscache Running
ldap Running
logger Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
snmp Running
spell Running
stats Running
zimbra webapp Running
zimbraAdmin webapp Running
zimlet webapp Running
zmconfigd Running
zimbra@mail:~$
Create a directory to store exported data and set the necessary permissions
root@mail:~# mkdir -p /opt/backups/zmigrate
root@mail:~# chown -R zimbra:zimbra /opt/backups/zmigrate
root@mail:~# cd /opt/backups/zmigrate
root@mail:/opt/backups/zmigrate#
Export domains, email accounts
zimbra@mail:/opt/backups/zmigrate$ zmprov -l gad > domains.txt
zimbra@mail:/opt/backups/zmigrate$ zmprov -l gaa > emails.txt
zimbra@mail:/opt/backups/zmigrate$
zimbra@mail:/opt/backups/zmigrate$ ls
domains.txt emails.txt
zimbra@mail:/opt/backups/zmigrate$ cat domains.txt emails.txt
testdomain1.com
admin@testdomain1.com
spam.bjyqpxa2@testdomain1.com
ham.ipqha8h5wk@testdomain1.com
virus-quarantine.przjjrzi@testdomain1.com
galsync.6lkcyfrni@testdomain1.com
stefania@testdomain1.com
arman@testdomain1.com
flaminia@testdomain1.com
irene@testdomain1.com
suman@testdomain1.com
annalisa@testdomain1.com
sharif@testdomain1.com
luca@testdomain1.com
carlo@testdomain1.com
paolo@testdomain1.com
matteo@testdomain1.com
fabio@testdomain1.com
lorenzo@testdomain1.com
zimbra@mail:/opt/backups/zmigrate$
Export all users data (i.e. password, display name)
zimbra@mail:/opt/backups/zmigrate$ mkdir userpass
zimbra@mail:/opt/backups/zmigrate$ for i in `cat emails.txt`; do zmprov -l ga $i userPassword | grep userPassword: | awk '{ print $2}' > userpass/$i.shadow; done
zimbra@mail:/opt/backups/zmigrate$
zimbra@mail:/opt/backups/zmigrate$ mkdir userdata
zimbra@mail:/opt/backups/zmigrate$ for i in `cat emails.txt`; do zmprov ga $i | grep -i Name: > userdata/$i.txt ; done
zimbra@mail:/opt/backups/zmigrate$
zimbra@mail:/opt/backups/zmigrate$ ls -llR userdata/ userpass/
userdata/:
total 56
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:47 admin@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 annalisa@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 arman@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 51 Jun 2 00:48 carlo@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 45 Jun 2 00:48 flaminia@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 268 Jun 2 00:47 galsync.6lkcyfrni@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:47 ham.ipqha8h5wk@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 irene@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 luca@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 0 Jun 2 00:48 paolo@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 sharif@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:47 spam.bjyqpxa2@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 stefania@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:48 suman@testdomain1.com.txt
-rw-r----- 1 zimbra zimbra 26 Jun 2 00:47 virus-quarantine.przjjrzi@testdomain1.com.txt
userpass/:
total 72
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 admin@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 annalisa@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 arman@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 carlo@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 fabio@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 flaminia@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 galsync.6lkcyfrni@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 ham.ipqha8h5wk@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 irene@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 lorenzo@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 luca@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 matteo@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 paolo@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:44 sharif@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 spam.bjyqpxa2@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 stefania@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 suman@testdomain1.com.shadow
-rw-r----- 1 zimbra zimbra 106 Jun 2 00:43 virus-quarantine.przjjrzi@testdomain1.com.shadow
zimbra@mail:/opt/backups/zmigrate$
Finally, you can check users message count and other information to verify them later. i.e.
zimbra@mail:/opt/backups/zmigrate$ for j in $( zmprov -l gaa | egrep -v "^(spam|ham)"); do total=0; echo -n "Total for $j = "; for i in $( zmmailbox -z -m "$j" gaf | awk '{print $4}' | egrep -o "[0-9]+" ); do total=$((total + i )); done; echo "$total"; done
Total for admin@testdomain1.com = 2649
Total for virus-quarantine.przjjrzi@testdomain1.com = 5
Total for galsync.6lkcyfrni@testdomain1.com = 5
Total for stefania@testdomain1.com = 61
Total for arman@testdomain1.com = 18
Total for flaminia@testdomain1.com = 60
Total for irene@testdomain1.com = 47
Total for suman@testdomain1.com = 41
Total for annalisa@testdomain1.com = 34
Total for sharif@testdomain1.com = 45
Total for luca@testdomain1.com = 31
Total for carlo@testdomain1.com = 24
Total for paolo@testdomain1.com = 10
Total for matteo@testdomain1.com = 11
Total for fabio@testdomain1.com = 26
Total for lorenzo@testdomain1.com = 12
zimbra@mail:/opt/backups/zmigrate$
Step-2
Transfer Data From Old Zimbra Server To New Carbonio CE Server
Before transferring the data check all services are running and then create folder on the Carbonio CE server.
zextras@mail:~$ zmcontrol -v
Carbonio Release 23.6.0
zextras@mail:~$
zextras@mail:~$
zextras@mail:~$ zmcontrol status
Host mail.example.com
amavis Running
antispam Running
antivirus Running
directory-server Running
mailbox Running
memcached Running
mta Running
opendkim Running
proxy Running
service webapp Running
service-discover Running
stats Running
config service Running
zextras@mail:~$
Now create folders as they were created on the Zimbra server.
root@mail:~# mkdir -p /opt/backups/zmigrate
root@mail:~# chown -R zextras:zextras /opt/backups/zmigrate
root@mail:~# cd /opt/backups/zmigrate
root@mail:/opt/backups/zmigrate#
Transfer data to the new server. You can use rsync
or any other tool to transfer these data. For example:
[You may need to modify/adjust the permissions of source/destination folder]
rsync -avp /opt/backups/zmigrate/* root@new_server_ip:/opt/backups/zmigrate/
root@mail:/opt/backups/zmigrate# rsync -avp /opt/backups/zmigrate/* root@192.168.1.192:/opt/backups/zmigrate/*
root@192.168.1.192's password:
sending incremental file list
domains.txt
emails.txt
userdata/
userdata/admin@testdomain1.com.txt
userdata/annalisa@testdomain1.com.txt
userdata/arman@testdomain1.com.txt
userdata/carlo@testdomain1.com.txt
userdata/flaminia@testdomain1.com.txt
userdata/galsync.6lkcyfrni@testdomain1.com.txt
userdata/ham.ipqha8h5wk@testdomain1.com.txt
userdata/irene@testdomain1.com.txt
userdata/luca@testdomain1.com.txt
userdata/paolo@testdomain1.com.txt
userdata/sharif@testdomain1.com.txt
userdata/spam.bjyqpxa2@testdomain1.com.txt
userdata/stefania@testdomain1.com.txt
userdata/suman@testdomain1.com.txt
userdata/virus-quarantine.przjjrzi@testdomain1.com.txt
userpass/
userpass/admin@testdomain1.com.shadow
userpass/annalisa@testdomain1.com.shadow
userpass/arman@testdomain1.com.shadow
userpass/carlo@testdomain1.com.shadow
userpass/fabio@testdomain1.com.shadow
userpass/flaminia@testdomain1.com.shadow
userpass/galsync.6lkcyfrni@testdomain1.com.shadow
userpass/ham.ipqha8h5wk@testdomain1.com.shadow
userpass/irene@testdomain1.com.shadow
userpass/lorenzo@testdomain1.com.shadow
userpass/luca@testdomain1.com.shadow
userpass/matteo@testdomain1.com.shadow
userpass/paolo@testdomain1.com.shadow
userpass/sharif@testdomain1.com.shadow
userpass/spam.bjyqpxa2@testdomain1.com.shadow
userpass/stefania@testdomain1.com.shadow
userpass/suman@testdomain1.com.shadow
userpass/virus-quarantine.przjjrzi@testdomain1.com.shadow
sent 5,736 bytes received 705 bytes 2,576.40 bytes/sec
total size is 3,031 speedup is 0.47
root@mail:/opt/backups/zmigrate#
Step-3
Let me remind you:
The process of transferring and importing old data can increase system load in Old server& Carbonio CE server. So you have two choices:
1. You can transfer/import old data in a small chunk without putting much load on the both servers
2. You can take a server migration downtime window to complete the transfer & import step.
Step-4
Restore all domains
zextras@mail:/opt/backups/zmigrate$ carbonio prov -l gad
example.com
zextras@mail:/opt/backups/zmigrate$
zextras@mail:/opt/backups/zmigrate$
zextras@mail:/opt/backups/zmigrate$ for i in `cat /opt/backups/zmigrate/domains.txt `; do carbonio prov cd $i zimbraAuthMech zimbra ;echo $i ;done
ac52982c-17b0-48bf-910f-468df2f08c6f
testdomain1.com
zextras@mail:/opt/backups/zmigrate$ carbonio prov -l gad
example.com
testdomain1.com
zextras@mail:/opt/backups/zmigrate$
Create/Restore all email accounts with old passwords and user data in the Carbonio CE server
[Create a script and modify the execution permission, ownership etc]
#!/bin/bash
#Script for creating the email accounts createacct.sh
USERPASS="/opt/backups/zmigrate/userpass"
USERDATA="/opt/backups/zmigrate/userdata"
USERS="/opt/backups/zmigrate/emails.txt"
for i in `cat $USERS`
do
givenName=$(grep givenName: $USERDATA/$i.txt | cut -d ":" -f2)
displayName=$(grep displayName: $USERDATA/$i.txt | cut -d ":" -f2)
shadowpass=$(cat $USERPASS/$i.shadow)
tmpPass="CHANGEme"
carbonio prov ca $i CHANGEme cn "$givenName" displayName "$displayName" givenName "$givenName"
carbonio prov ma $i userPassword "$shadowpass"
done
[Sample output]
zextras@mail:/opt/backups/zmigrate$ ./acc.sh
39ca3914-62a1-4c06-bc25-820d6e7ac44b
caeeedc6-b88f-46dc-ae6f-6894a72c45f3
7550537d-2c9e-40ed-a560-a02ae2afebcb
d86b1500-d7e3-46e6-af5f-a8b132b609e3
6ba8d7a8-1938-41fb-8081-cdae9f4085b3
0891631f-84a7-4aa6-beac-f1f83baa7771
ca3e05ba-de69-4c20-892e-9cb886da6b33
6a649fc4-c5a2-452d-bfcb-a4644abdae16
2b7f65f5-13a2-491c-8a91-b140945e10d0
16d44e96-229c-46c0-9154-e01624946b77
a7cda48f-5b2d-4edb-a32d-79c96ab3c07f
fd4d7e09-3a65-4f21-9774-7f565840b153
0d2822f5-0dec-4764-a68e-46a272f21d15
a0c5189f-4de6-4226-9119-a8fb400222a4
1e4d3937-c4cf-4b0d-97cf-6e29de461492
ef811730-2daf-4b12-94b0-57834717700a
6b629e72-44d8-45cb-8df6-ee9061884e18
13d557f9-a03b-428e-9be6-d5f142395070
zextras@mail:/opt/backups/zmigrate$
zextras@mail:/opt/backups/zmigrate$
zextras@mail:/opt/backups/zmigrate$
zextras@mail:/opt/backups/zmigrate$ carbonio prov -l gaa -v testdomain1.com | grep -e displayName
displayName: Flami
displayName: Carlo Facci
zextras@mail:/opt/backups/zmigrate$
Step-5
Now you can change the DNS record (MX record) to migrate the service from Zimbra to Carbonio CE.
We still need to export, transfer & export user data (email, contacts, calendars)
Step-6
Important Note:
Few things you should keep in mind before starting the mailbox export/import process:
1. Set the socket timeout high (i.e. zmlocalconfig -e socket_so_timeout=3000000; zmlocalconfig –reload)
2. Check if you have any attachment limits. If you have increase the value during the migration period.
Export Data from Zimbra Server and transfer them to Carbonio CE:
root@mail:/opt/backups/zmigrate# mkdir MBOX
root@mail:/opt/backups/zmigrate# chown -R zimbra:zimbra MBOX
root@mail:/opt/backups/zmigrate# su - zimbra
zimbra@mail:/opt/backups/zmigrate/MBOX$ for email in `cat /opt/backups/zmigrate/emails.txt`; do zmmailbox -z -m $email -t 0 getRestURL '/?fmt=tgz' > $email.tgz ; echo $email ; done
admin@testdomain1.com
spam.bjyqpxa2@testdomain1.com
ham.ipqha8h5wk@testdomain1.com
virus-quarantine.przjjrzi@testdomain1.com
galsync.6lkcyfrni@testdomain1.com
stefania@testdomain1.com
arman@testdomain1.com
flaminia@testdomain1.com
irene@testdomain1.com
suman@testdomain1.com
annalisa@testdomain1.com
sharif@testdomain1.com
luca@testdomain1.com
carlo@testdomain1.com
paolo@testdomain1.com
matteo@testdomain1.com
fabio@testdomain1.com
lorenzo@testdomain1.com
zimbra@mail:/opt/backups/zmigrate/MBOX$
zimbra@mail:/opt/backups/zmigrate/MBOX$ ls -ll
total 712
-rw-r----- 1 zimbra zimbra 585530 Jun 2 02:14 admin@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 9531 Jun 2 02:14 annalisa@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 5043 Jun 2 02:14 arman@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 6441 Jun 2 02:14 carlo@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 6741 Jun 2 02:15 fabio@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 12583 Jun 2 02:14 flaminia@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 2073 Jun 2 02:14 galsync.6lkcyfrni@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 1917 Jun 2 02:14 ham.ipqha8h5wk@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 10188 Jun 2 02:14 irene@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 4015 Jun 2 02:15 lorenzo@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 7450 Jun 2 02:14 luca@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 3959 Jun 2 02:15 matteo@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 3729 Jun 2 02:14 paolo@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 9944 Jun 2 02:14 sharif@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 1913 Jun 2 02:14 spam.bjyqpxa2@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 13462 Jun 2 02:14 stefania@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 9048 Jun 2 02:14 suman@testdomain1.com.tgz
-rw-r----- 1 zimbra zimbra 1913 Jun 2 02:14 virus-quarantine.przjjrzi@testdomain1.com.tgz
zimbra@mail:/opt/backups/zmigrate/MBOX$
Transfer these data to the Carbonio CE server. You can use rsync
or any other tool to transfer these data. For example:
root@mail:/opt/backups/zmigrate/MBOX# rsync -avp /opt/backups/zmigrate/MBOX/ root@192.168.1.192:/opt/backups/zmigrate/MBOX
root@192.168.1.192's password:
sending incremental file list
created directory /opt/backups/zmigrate/MBOX
./
admin@testdomain1.com.tgz
annalisa@testdomain1.com.tgz
arman@testdomain1.com.tgz
carlo@testdomain1.com.tgz
fabio@testdomain1.com.tgz
flaminia@testdomain1.com.tgz
galsync.6lkcyfrni@testdomain1.com.tgz
ham.ipqha8h5wk@testdomain1.com.tgz
irene@testdomain1.com.tgz
lorenzo@testdomain1.com.tgz
luca@testdomain1.com.tgz
matteo@testdomain1.com.tgz
paolo@testdomain1.com.tgz
sharif@testdomain1.com.tgz
spam.bjyqpxa2@testdomain1.com.tgz
stefania@testdomain1.com.tgz
suman@testdomain1.com.tgz
virus-quarantine.przjjrzi@testdomain1.com.tgz
sent 697,242 bytes received 410 bytes 279,060.80 bytes/sec
total size is 695,480 speedup is 1.00
root@mail:/opt/backups/zmigrate/MBOX#
Step-7
Import the data to the Carbonio CE server: [On Carbonio Server]
Important Note:
Few things you should keep in mind before starting the mailbox export/import process:
1. Set the socket timeout high (i.e. zmlocalconfig -e socket_so_timeout=3000000; zmlocalconfig –reload)
2. Check if you have any attachment limits. If you have increase the value during the migration period
3. Set Public Service Host Name & Public Service Protocol to avoid any error/issue like below one
root@mail:/opt/backups/zmigrate/MBOX# chown zextras:zextras *
zextras@mail:/opt/backups/zmigrate/MBOX$ for i in `cat /opt/backups/zmigrate/emails.txt`; do zmmailbox -z -m $i -t 0 postRestURL "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/$i.tgz ; echo "$i -- finished "; done
ERROR: zclient.IO_ERROR (Connection refused) (cause: java.net.ConnectException Connection refused)
admin@testdomain1.com -- finished
ERROR: zclient.IO_ERROR (Connection refused) (cause: java.net.ConnectException Connection refused)
spam.bjyqpxa2@testdomain1.com -- finished
ERROR: zclient.IO_ERROR (Connection refused) (cause: java.net.ConnectException Connection refused)
ham.ipqha8h5wk@testdomain1.com -- finished
[Finally after the fix mentioned in the previous important note specially about setting PublicServiceProtocol as https 🙂]
zextras@mail:/opt/backups/zmigrate/MBOX$ for i in `cat /opt/backups/zmigrate/emails.txt`; do zmmailbox -z -m $i -t 0 postRestURL "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/$i.tgz ; echo "$i -- finished "; done
admin@testdomain1.com -- finished
spam.bjyqpxa2@testdomain1.com -- finished
ham.ipqha8h5wk@testdomain1.com -- finished
virus-quarantine.przjjrzi@testdomain1.com -- finished
galsync.6lkcyfrni@testdomain1.com -- finished
stefania@testdomain1.com -- finished
arman@testdomain1.com -- finished
flaminia@testdomain1.com -- finished
irene@testdomain1.com -- finished
suman@testdomain1.com -- finished
annalisa@testdomain1.com -- finished
sharif@testdomain1.com -- finished
luca@testdomain1.com -- finished
carlo@testdomain1.com -- finished
paolo@testdomain1.com -- finished
matteo@testdomain1.com -- finished
fabio@testdomain1.com -- finished
lorenzo@testdomain1.com -- finished
zextras@mail:/opt/backups/zmigrate/MBOX$
Now check the message count and other information to verify the migration:
zextras@mail:/opt/backups/zmigrate/MBOX$ for j in $( carbonio prov -l gaa | egrep -v "^(spam|ham)"); do total=0; echo -n "Total for $j = "; for i in $( zmmailbox -z -m "$j" gaf | awk '{print $4}' | egrep -o "[0-9]+" ); do total=$((total + i )); done; echo "$total"; done
Total for zextras@example.com = 8
Total for virus-quarantine.magoeimvge@example.com = 0
Total for galsync.htriqf0fj6@example.com = 0
Total for admin@testdomain1.com = 2765
Total for virus-quarantine.przjjrzi@testdomain1.com = 5
Total for galsync.6lkcyfrni@testdomain1.com = 5
Total for stefania@testdomain1.com = 61
Total for arman@testdomain1.com = 18
Total for flaminia@testdomain1.com = 58
Total for irene@testdomain1.com = 47
Total for suman@testdomain1.com = 41
Total for annalisa@testdomain1.com = 34
Total for sharif@testdomain1.com = 45
Total for luca@testdomain1.com = 31
Total for carlo@testdomain1.com = 24
Total for paolo@testdomain1.com = 10
Total for matteo@testdomain1.com = 11
Total for fabio@testdomain1.com = 26
Total for lorenzo@testdomain1.com = 12
zextras@mail:/opt/backups/zmigrate/MBOX$
So our message count shows the migration is successful. Still let’s check the contacts and calendar data from GUI of user accounts:
So you can see user stefania@testdomain1.com & carlo@testdomain1.com has their contacts and calendar events migrated properly.
So that’s it.
As this is a semi automatic process, please keep aware of the permission/ownership issues during executing any command. Also please do not copy/paste command to avoid typo.
Thanks for your time.
🙂
Comments
Does this also move Briefcase files, Tasks, and Preferences?
Hello, thanks for this tutorial. I had problems with the shares, they appear shared with the ID's of the users on the source server. is there any way to change these IDs to be the same as the origin server? Thank you.
Hello, I've used these instructions and some of the emails in the Inbox folder are not copied to Carbonio CE. I have 1055 mails on zimbra and only 563 are copied to Carbonio. Everything else (Sent folder, Trash, Calendars, Contacts) migrated successfully. I tried imapsync to sync the Inbox and a few seconds after the imapsync is done the emails are deleted from the server. I've matched the values of zimbraFileUploadMaxSize, message_size_limit and zimbraMailContentMaxSize to be the same as the zimbra server but the problem still persists. Can you help me figure out a solution? Thanks
In this part for i in `cat /opt/backups/zmigrate/emails.txt`; do zmmailbox -z -m $i -t 0 postRestURL "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/$i.tgz ; echo "$i -- finished "; done No need to modify PublicServiceProtocol, just run with the -u option for i in `cat /opt/backups/zmigrate/emails.txt`; do zmmailbox -z -m $i -t 0 postRestURL -u https://$HOSTNAME "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/$i.tgz ; echo "$i -- finished "; done
Using the option as you have put, I stopped restoring many emails from 2021 onwards, it did not restore anything
This procedure works well su - zextras zmlocalconfig -e socket_so_timeout=3000000 zmlocalconfig --reload zmlocalconfig -u socket_so_timeout zmlocalconfig --reload zmcontrol restart for i in `cat /opt/backups/zmigrate/emails.txt` do zmmailbox -z -m $i -t 0 postRestURL -u https://$HOSTNAME "//?fmt=tgz&resolve=skip&callback=ZmImportExportController__callback__import1&charset=UTF-8" /opt/backups/zmigrate/MBOX/$i.tgz; echo "$i -- finished " done
please how can i migrate my zimbra filtre and signature config also ? I used imapsync but it doesn't work again
@cleverflores I am doing a fairly large migration from Zimbra to Carbonio in my test environment. I have experienced that importing a LARGE .tgz files are problematic with your suggested method described in this post. It is also a known limitation documented by Zimbra in KB24494. One of my mailbox users alone is 10.5GB = 5.9GB tgz. No matter what you do, the zmmailbox commands will experience a timeout and not successfully import all the data (emails, contacts, calendars, etc). The zmmailbox commands work well for small mailbox users (.tgz < 1.0GB) but it's unreliable for anything larger. I also found that your posting above on 12/11/2023 has a few typos which caused the command to fail. And furthermore the Carbonio instructions on Import Calendar .ICS and .CSV do not work using the prov SearchAccount (sa) command, as described here: https://docs.zextras.com/carbonio-ce/html/postinstall/migration.html Its been frustrating. But the good news is that I finally got this to work and wanted to post how it was accomplished - for anyone who might experience the same issues I had trying to migrate to Carbonio. See the link below in the Community Forum. https://community.zextras.com/forum/carbonio-setup/migration-process-of-carbonio-community-edition/paged/3/#post-7159 I hope this helps. D.
when executing the command in step 7 for i in `cat /opt/backups/zmigrate/emails.txt `; do mailbox -z -m $i -t 0 postRestURL "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/$i.tgz ; echo "$i --finished "; done I get the response ERROR: service.FAILURE (system failure: POST failed, status=404 404) galsync@bf.kg -- finished can you tell me what the problem might be?
I got 302 error while transfering big mailboxes. But I managed to migrate 26GB mailbox. So here how I did it. Step1 : zmlocalconfig -e socket_so_timeout=99999999 Step2: zmlocalconfig --reload Step3: copy your big mailbox to MBOX (or where ever you want) and makesure it is owned by zextras Step4: zmmailbox -z -m migrate@thismailbox.c0m -t0 postRestURL -u https://mail.yournewserver.c0m "/?fmt=tgz&resolve=skip" /opt/backups/zmigrate/MBOX/migrate@thismailbox.c0m.tgz When you finish all the mailbox/s Step5: zmlocalconfig -e socket_so_timeout=30000 Step6:zmlocalconfig --reload As you see I changed "-t 0" to "-t0" , put a "-u" with my full domain name as told in the comments above. It takes a while to process 26GB mailbox but it successedfully finishes. Cheers
Hi, Your help was amazing. Thank you for that. Only with your contribution was I able to restore the accounts