Migrating dns,postfix server to ispconfig : advices ...

Discussion in 'General' started by ledufakademy, Sep 9, 2020.

  1. ledufakademy

    ledufakademy Member

    hello,
    it's near time for us to make the big jump.
    first i want to thank till, th0m, jesse , aharis ... and those i forget for their huge support ... and patience.
    what is the best way, with less down time, to migrate from classical webhosting to ispconfig.
    for :
    1. Dns server,
    2. postfix server,
    3. databases servers,
    4. then web servers (nextcloud, worpress, grav, gitea, rainloop, roundcube,ethercalc,pastbin)
    5. and lets encrypt stuff ... actually hold on nginx reverse proxy.
    advices are welcome.
     
    Last edited: Sep 9, 2020
  2. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    - Create all records (DNS zones, email domains and mailboxes, databases) before you migrate
    - Change the DNS records on your own DNS servers to point to the new mail- and webserver, but don't change the designated nameservers for your domain(s) yet.
    - I don't know how you host your email currently, but you have to copy all mails from the old server to the new one. If you host the old server yourself, you could use something like rsync or dsync. This way all emails will be on the new server. You can test this before moving by logging in to your webmail on the new server and see if your messages are there. If you don't have such access, you can use a tool like fetchmail (included in the panel), but you'll need the credentials for every account.
    - Web: For static content, just copy the files from the old server to your new server. Make eventual changes on the new server, otherwise they will be lost ;) For applications like nextcloud, take a look at https://docs.nextcloud.com/server/15/admin_manual/maintenance/migrating.html
    - When all data is copied to the new servers(), change the DNS records (on your old nameservers) for your web applications to point to their new server.
    - Usually it is possible to create your Let's Encrypt certificates a few minutes after that
    - When that's all done, changed the designated nameservers for your domain to your new nameservers.

    Remember, you can do things one by one. You could start on monday with nextcloud, tuesday your website, wednesday your email, etc.
    PS: I think that the only thing I'm missing is your nginx reverse proxy, but I think there is more information on the forums about how to do that.
     
    ledufakademy likes this.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    In that case, use something imap based like imapsync or imapcopy. Fetchmail certainly has some drawbacks...
     
  4. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    I always use imapsync, perfect tool. See https://imapsync.lamiral.info/
     
    ledufakademy likes this.
  5. ledufakademy

    ledufakademy Member

    golden words, i will think about all this good advices !!!
    (DNS zone are already created on ispconfig)
     
    Th0m likes this.
  6. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Okay, let us know if you need any help.
     
    ledufakademy likes this.
  7. michelangelo

    michelangelo New Member

    Dovecot's dsync is the gold standard when it comes to migrating POP3 and IMAP accounts. However, imapsync can be used too. It will just not migrate the IDs of the accounts emails which will lead to the effect that the client will have to re-download all emails of the account.
     
  8. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Yes, dsync would be best, but if the user has no access to the server it can't be used.
     
  9. ledufakademy

    ledufakademy Member

    Th0m , do you think i can create mail domain in ISPconfig for all my ... 8 clients (;-)) , already ?
    (first setp is done, create all dns zone , but stay on old dns)
    note : web server and mail account are not migrate at this step.
     
  10. Th0m

    Th0m ISPConfig Developer ISPConfig Developer

    Yes, but keep in mind that if you do that and you migrate client1 but not client2, eventual emails from client1 to client2 will be delivered locally.
     
  11. ledufakademy

    ledufakademy Member

    why ?

    i don't move dns record , this is just ispconfig stuff ?
    (i don't touche old stuff)
     
  12. Jesse Norell

    Jesse Norell ISPConfig Developer ISPConfig Developer

    You can prevent this by using the 'Active' setting in the mail domains. So create all 8 clients, add their mail domains, mailboxes, etc., but uncheck 'Active' for all mail domains. Then one by one when you migrate a domain and take it live on ISPConfig, set that domain active. (That's a very nice feature many panels don't have, which makes migrations problematic.)
     
    ledufakademy likes this.
  13. michelangelo

    michelangelo New Member

    What do you mean by "if the user has no access to the server"? You mean no access to the destination server, or no access to the source server?
    In case of the destination server this might be true, the latter case however not.
     
  14. ledufakademy

    ledufakademy Member

    hum : ingenious way !
    it will be done like that.
     
  15. nhybgtvfr

    nhybgtvfr Active Member

    dsync setup and configuration would need root access to both servers to configure the dovecot replication, restart the dovecot service and open the required firewall ports.
     
  16. michelangelo

    michelangelo New Member

    Wrong! You are reducing dsync just to the ability of replicating emails but you can also use it as a CLI command to sync between servers!
     
  17. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    How can dsync do that without account and password on both servers?
     
  18. nhybgtvfr

    nhybgtvfr Active Member

    yes, but then you'd have to do each mailbox individually. for a server with a lot of users, especially a lot of user on the same domains, that's not particularly practical. especially if you want to keep the two mailservers mailboxes in sync during the dns change propagations.
     
    Th0m likes this.
  19. exynenem

    exynenem Member

    Never heard of scripting? How would you do it with imapsync then?

    The magic word is "master-user" and you need access to at least one server...
     

Share This Page