New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
What is the best way of backing up my mailbox?
dennislorren
Member
Hey guys,
I'm using Oracle Cloud free ARM instance for my personal email hosting using HestiaCP. I have done the following steps to configure my server.
1. removed the oracle ubuntu and installed Debian minimal.
2. Setup SMTP2GO and Backup MX Server.
Now, my main concern is that one day the server will go poof and all my mail with go with it. How can I backup all my emails so that in case the server goes down, I can easily recover all my emails? Any free solution that can do this? Thanks
Comments
IMAP?
How do I do that?
zip -r home.zip /home
scp home.zip root@backupserver:/home/backupfolder
It depends how you have it configured to store mail (or how it automatically does so without giving you an option). If MailDir then you need to backup your ~/MailDir/ directory (and sub-directories of course) if mbox then there will be one file per user usually in /var/mail/. In either case backup these files with your usual method (rsync to somewhere is mine). For mbox you may need to be careful of the size of keeping multiple generations, for maildir as each message is a file then keeping many snapshots can be very space efficient.
To restore, reconfigure your server and copy in the latest backup. Obviously you need to backup the configuration details (or document them in detail so you can manually recreate them accurately if disaster strikes) as well.
I actually have a second mail server, hidden from the rest of the world by default, that each day wipes itself and restores from the latest backup, and I login occasionally to make sure recent messages are there (I really should add some automation to that). This tests the backups are working, and gives me an easy way to quickly restore the mail server: have that restore from the latest backup as if it was the daily test, turn off the wipe+restore, and update firewall rules & DNS settings, so it becomes the live server (then duplicate again so I have a new backup service).
Thanks, I'll give it a try. In order to restore the backup, Do I just copy the home directory or do I need to create the user first in Hestia?
I use HestiaCP. It does all of the things itself. I did a littlt digging. it seems it stores mail files in /home/{user}/mail/{domain}/
@dennislorren said:
Yeah you'd need to. Probably easier to backup and restore using this though: https://docs.hestiacp.com/admin_docs/backups.html
I'll look into it. Thank you so much for the help
i prefer pop3 and smtp. then you have all your mails on your pc.
Use the built-in backup system of HestiaCP