Hi,
I have two Nethservers. One in the old and current stable version 6.8 and one on the new 7 final version.
I like to migrate all mails, only two inboxes, from one Nethserver to the other.
The following ways came to my mind:
Use the backup data function of Nethserver. But I am unsure what exactly is backuped and I don’t know if it will work like I expect - only backup the mails (I don’t use the fileserver).
Connect old and new inbox via any Mailclient and move the content from one Mailserver to the other.
I am curious if there is also a “copy-paste”-Way by just moving the Files from one Nethserver to the other, in case you have more than just two inboxes.
Is there a recommended way to do the migration in general?
Imapsync also but you have to know all password of your users
A rsync also on the folder /var/lib/nethserver/vmail should do the trick. Normally rsync used with the root user to the remote server should preserve all permissions.
Of course you must create your user throught ldap or samba4 Ad before to use imapsync or rsync
The other way i have in mind is to do a backup and a restoration
As said by @stephdl, the method I prefer is rsync. It allows you to make a copy at different times. sopprattutto convenient solution if you have large amounts of data and minimizes downtime
I am currently trying this one.
Just have to get the SSH connection to work. I assume the source server is blocking the connection, but I am investigating…
I moved my mails by copying the directories (NOT all the files) in /var/lib/nethserver/vmail//Maildir from the old to the new server. Only the file “subscriptions” need to be copied manually. It contains the folders you created in your inbox. All other files (all are starting with “dovecot-” were not copied by me). The Account was already created on the new server before, so I have the same folderstructure already in on the new server.
rsync: change_dir "/home/e-smith/files/users/vmail/Maildir" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1518) [Receiver=3.0.9]
[INFO] Tue Feb 7 12:02:55 CET 2017 -- Synchronizing vmail@mydomain.de Maildir/
[INFO] Skip vmail@mydomain.de
Maybe something that must be fixed, because the mails are stored on a different location than the script seems to expect.
Yes, didn’t checked that but it sounds like I have to know the credentials of each inbox, which I maybe don’t have.
Its not only about moving Mails from A to B in THIS case with my two mailboxes. It is also a tech-check if you have to do it for maybe hundreds of boxes.
please, re read all the 3ad… both me and Davive told you about dovecot master user… IOW, you can have an user (on each server) that can auth himself on behalf of any user…
so the migration script is just a loop among user list… quite trivial… and without knowing anything about the user except the username
@Stefano_Zamboni@filippo_carletti
The box is checked.
I tried to login as username*admin with admin-password like it is mentioned in the help dialog (Replace “username” with random username and “admin” with an administrative user). That didn’t worked. Checked it with Outlook and Thunderbird.
The easiest way is to use imapsync in my experience. This means that all users can be processed at once, there are good logs and only certain folders can be synchronized.