Koozali.org: home of the SME Server

Obsolete Releases => SME Server 9.x => Topic started by: jarthurs on November 15, 2017, 07:08:07 PM

Title: Manually copying mail to new server, is this possible?
Post by: jarthurs on November 15, 2017, 07:08:07 PM
I had a server fail due to a bad capacitor on the motherboard, I've restored the last full backup to new hardware and everything is running fine.

I've mounted the RAID volume and recovered a couple of documents that were updated however there are a few emails between the last backup and the failure time. Is there any way of manually exporting them and having the new server re-index them into the new mail database?

Regards,
Jason.
Title: Re: Manually copying mail to new server, is this possible?
Post by: ReetP on November 15, 2017, 07:58:30 PM
If you know the files it should be fine.

Mails are 'just another file'.

Copy them over and make sure the perms are ok and they should get indexed and added ok.

If in any doubt TEST TEST TEST :-)

Have yourself an old box, or better still in this day and age a vm you can practice on.

B. Rgds
John
Title: Re: Manually copying mail to new server, is this possible?
Post by: Jean-Philippe Pialasse on November 15, 2017, 08:16:11 PM
mails are in the Maildir folder of each user home, meaning:

/home/e-smith/Maildir for admin

/home/e-smith/files/users/USERNAME/Maildir for others

just rsync from one machine to another for every users and you should be correct.

There also alternative using imap to sync the emails https://wiki.contribs.org/Imapsync
Title: Re: Manually copying mail to new server, is this possible?
Post by: jarthurs on November 15, 2017, 08:43:51 PM
There are three days between the last full backup and the old server going 'pop' and it's only one particular user who is missing messages so they shouldn't be hard to track down. I just wanted to check that injecting them directly into the folders wasn't going to cause any fallout.

Thanks,
Jason.

Title: Re: Manually copying mail to new server, is this possible?
Post by: Jean-Philippe Pialasse on November 15, 2017, 09:21:15 PM
the only issue you might get is duplicates, or deleted /sorted messages poping back, which is a minor issue.


just pay attention that ownership are the same after restore.

JP
Title: Re: Manually copying mail to new server, is this possible?
Post by: jarthurs on November 16, 2017, 01:40:12 PM
I did have one folder where the permissions were an issue but a quick chown user:group solved it.

Many Thanks,
Jason.

the only issue you might get is duplicates, or deleted /sorted messages poping back, which is a minor issue.


just pay attention that ownership are the same after restore.

JP