Email Backup and Restore
I need to backup a specific email account. How do I do this using the shell?
This email is taking up a lot of space on the server. After backing up the account, I would like to know what is the best procedure to delete emails, preferably the oldest ones?
And if I need to restore these emails in the future, what is the best option?
-
Hey there! There aren't any automated tools to backup a single email account over SSH. Your best option would be to backup the directory at /home/username/mail/domain.com/email-account as that would backup all their files,
To ensure that it is easier to restore the email addresses and passwords, I'd recommend taking a full cPanel backup, as that will have all the directories to make the account function as well as the mail content.
0 -
I managed to make a backup.
How do I delete all emails from 2022 from an email account?
I got to the function: Email Disk Usage and it can be customized using Dovecot query, but I didn't understand how to delete the emails from 2022.
0 -
I'm not able to provide a custom dovecot query to remove emails over the Forums. If for some reason it was incorrect or there was an issue with the copy paste, it would delete all your emails.
I'd recommend doing some testing with the doveadm queries on your side to ensure they handle what you want. You can also create a ticket so this can be tested directly on your server.
0
Please sign in to leave a comment.
Comments
3 comments