Retrieve Emails from backup

Discussion in 'General' started by deividmen, Aug 31, 2019.

  1. deividmen

    deividmen Member

    I have an Ubuntu 16.04 server with ISPConfig 3.1 and many websites installed.
    I had to move some websites from an old server to a new one. I created the same mailboxes, but I need to retrieve the emails from the old server. I tried with Roundcube but it only allows to export emails one by one.

    I'm thinking about using the backup files from ISPConfig in order to move them to the new server and restore them.
    Is it possible to do this?
    Is there another way to retrieve the emails?
     
    Last edited: Aug 31, 2019
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    you can just rsync the whole vmail folder across (don't set it to delete files that don't exist on the source machine just in case new emails or mailboxes exist on the target machine)
    you may need to re-index the mailboxes on the target machine afterwards, using dovecotadm. a quick google will tell you how.
    or if your using the ispconfig migration tool, you can use that and just migrate the mail services.
     
  3. If you use imap accounts, and have already recreated in the new server all accounts, imapsync is a good option to transfer email contents. Look for it in github. We combine it with some simple scripts to do mass email content migrations.
     
  4. elmacus

    elmacus Active Member

    Rsync with archive, or else you will loose dates and user, should always be vmail:vmail (not root). I did not have to run any dovecotadmin last time.
    Something like this, check your switches, and remove dry-run when you are happy.
    rsync --progress --dry-run -ravu /backup/vmail/domain /var/vmail/domain
    And test with single account first....
     
  5. deividmen

    deividmen Member

    Thanks for your help. I didn't want to mess it up, so I just connected to the old server using Outlook, exported all of the emails as a .pst file, connected to the new server and imported them all. It was a lot of work, and I did it just with the most important mailboxes.

    I wish it was possible to do the same with the webmails.
     
    Last edited: Sep 6, 2019
  6. Taleman

    Taleman Well-Known Member HowtoForge Supporter

Share This Page