How should I backup my users mail in ubuntu?
By Daki - Last updated: Monday, July 6, 2009 - Save & Share - One Comment
Gino L asked:
I have a ubuntu server with about 15 users. The combined mail size is 20gb. What would be the best way of backing this up daily? Who about recovering it?
kuapp.com/
I have a ubuntu server with about 15 users. The combined mail size is 20gb. What would be the best way of backing this up daily? Who about recovering it?
kuapp.com/


Comment from edman274
Time July 6, 2009 at 9:31 pm
Set up a cron script to copy everything in /var/mail to an external drive (be it tape, internal drive or portable drive), and set it up to do this daily.
Webmin makes this pretty easy. You do sudo apt-get install webmin and then to get to it you go to where server is the IP or hostname of whichever server it is you’re managing. From there, you would’ve entered in your username and address and then you’d navigate to the left hand pane and chosen “System – Scheduled cron Jobs”. Choose “Create a new cron job” and run through the steps. The actual command for copying the mail would be something like
cp -r /var/mail/ /dev/sdx1
where sdx1 is whichever drive you’re copying the mail into. You could copy it into an NFS drive, but that’s beyond the scope of this answer.