How to restore email backup without overwriting more recent emails?
We had an issue today and someone who was not familiar with the WHM / CPanel system has deleted all INBOX messages older than 1 year for a client account email address .
We have a backup for yesterday (21st March) and have this backup to hand, as a tar.gz file.
I want to double check the process for restoring the users email address replacing all the removed emails while not overwriting the more recent emails since the backup was generated last night?
The server uses "maildir" email storage mechanism.
1) Is the filepath of the INBOX the /cur directory?
2) We have the local files for \account\homedir\mail\domain\emailaddress\cur
This contains many files shaped like:
> 1679258716.M259124P16294.server-address.co.uk,S=92058,W=95491:2
3) Can we use SFTP to simply copy paste these files back into the server /cur directory and will this cause any issues for the client / end user?
FROM (backup file) account\homedir\mail\domain\emailaddress\cur\,
TO: /home/account/mail/domain/emailaddress/cur
4) Do we need to manually update/edit any of the Dovecot indexing files in the parent directory on the server ; /home/account/mail/domain/emailaddress ?
5) Is there anything else we need to consider when repairing this issue?
Thanks
-
Hey there! The method you have outlined is the correct procedure for a mail account using the maildir folder structure. However, I believe it would be a bit easier to use the rsync command on the entire \account\homedir\mail\domain\emailaddress directory - that way, only missing messages will be synced from the backup, and newer messages on the account will be untouched. This would also preserve the "read" status of the messages. 0 -
Hey there! The method you have outlined is the correct procedure for a mail account using the maildir folder structure. However, I believe it would be a bit easier to use the rsync command on the entire \account\homedir\mail\domain\emailaddress directory - that way, only missing messages will be synced from the backup, and newer messages on the account will be untouched. This would also preserve the "read" status of the messages.
Thanks Rex that's great. I'm not too familiar with rsync but will read up on it and make use of it. Cheers!0
Please sign in to leave a comment.
Comments
2 comments