Moving mail from account directory
The vast majority of cPanel servers is filled with email. Email in itself does not require SSD and the cost difference in SSD VS NAS / HDD storage is massive. We have a very large NAS that is under-utilized and it simply makes sense to use it as a mail storage solution.
There has been an open feature request with about 200 votes, and a couple of years ago it seemed that cPanel was looking for a solution where we can move the mail directory from the user account directory, but it has also gone quiet: https://features.cpanel.net/topic/store-email-on-a-different-partition
The way I see it is it can be achieved using a simple symlink:
- create new directory on different partition
- rsync contents
- move old mail directory to mail to mail.old (for backup purposes)
- create symlink between /home/account/mail to /mail/home/account/mail where /mail is the new (hdd) partition
This will allow much better control for sysadmins to manage resources better, might even speed up IO for websites as there is no more mail activity on the SSD's and in some cases will also help if you backup your cPanel servers (cloud servers) with snapshots.
My question is rather a) if cPanel has a better solution in progress, maybe where the dovecot config can be updated instead of using a symlink. The other concern is backups of emails. We use Jetbackup but it seems that they do not follow symlinks, so if the mail is a symlink I am not sure if it will be backed up.
Has anyone else performed something similar? Outcomes and pitfalls will be greatly appreciated :)
-
I can't say anything with regards to a better implementation method but what I can share is that you should be able to simply setup a custom directory Jetbackup from a secondary destination. So that should not be that difficult to get working in the scenario described.
You could simply test it with a dummy account and only asking Jetbackup on secondary destination to back-up the mail folder in the specific /home/user directory. Than remove the content and restore it from secondary destination. The only thing that will be a potential bottleneck as far as I am reading it is the restore speed of the HDD compared to a SSD.0
Please sign in to leave a comment.
Comments
1 comment