Hope all is well. My company uses MIAB for daily emails and I use Digital Ocean to store the data. I’ve Upgraded it twice over the years and I just don’t want to keep paying Digital Ocean more monthly to store more data. Can anyone walk me through or send a link regarding backing up old data? Ideally Id like to store any emails before 2020 either on a physical drive or somewhere else.
/home/user-data/mail/mailboxes/<DOMAIN>/<USER>/cur
is the path to the files.
-mtime is used to specify the number of days old that the file is. +365 will find files older than 365 days which is one year
-exec allows you to pass in a command such as rm.
I definitely didn’t do any testing on this… Totally recommend doing your own testing and ensure you have backups.
Users could also “download” mail from roundcube or archive emails with a email client like Thunderbird or Outlook to a private folder that is stored on the PC rather then the mailserver (this would have to be done for each user)
Ultimately this is why I think this project needs to have “quotas” and why I tend to stay with the quota’s fork. If you give users a certain GB limit then users have to police their own inbox. They wont be able to send or receive mail if they are over their quota.
Backup solutions aside, since there’s already 2 answers above.
Use Volumes
Instead of upgrading your droplet. (eg, Basic tier of $6 to the next tier is $12, with 25gb additional storage.), use their Volume service. 25gb is only $2.50.
You can then symbolic link your /home/user-data to /mnt/externalvolume.
I used Volumes, hence during the upgrade from ubuntu 18 to 22 recently, all I did was just remount the drive and skipped all the duplicity backup/restore altogether.