Merge mail backup with existing account

Hi All,

Long story short, but I had a hard disk crash over a week ago and only just recovered the backups from the faulty drive. In the meantime I had to get mail working again, so on a new box I set up a Hestia install and re-created the accounts.

Fast forward to today and I have the Hestia backups pre-crash. Now I want to merge the mail from the backup so I don’t lose any mail over the last week.

Is there a method of restoring just the mail, and telling it to merge rather than replace?

Would another method be to copy the mail directories to /tmp/ and then use doveadm import to pull everything in? (in which case, what’s the format for that? Google seems to have many methods, but none specific to Hestia). For example doveadm import -u [email protected] maildir:/tmp/mail/account/Maildir /home/user/mail/domain/account/Maildir all ran without errors, but no mail showed up in my inbox…

I also tried just dropping a message directly into the /cur/ folder using FTP, but it didn’t show up in my mailbox. Maybe it is that easy and I just need to re-index Dovecot?

Any ideas?



Try with imapsync by Gilles Lamiral.

You can find it in GitHub.

Basically you create a file with:; [email protected]; password1;; [email protected]; password2;

You can merge accounts like this; [email protected]; password1;; [email protected]; password2;; [email protected]; passwordxxx;; [email protected]; password2;

That will require the old host to be live as an imap server though, won’t it? The old server is dead - I have the files, but there’s no active server there to respond.

To replace mail only, yes, to merge, no.

You could extract the backup and copy over the mail content folders manualy, this would merge the content. Otherwise you would need to spin up a second server, restore the backups and use imapsync to get them to the current server.

You can merge with imapsync with only one server.

Configure same server in origin and destination but different accounts

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.