|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Best Practice: Backing up Maildirs
From: mess-mate (messmate
free.fr)
Date: Fri Jul 01 2005 - 09:32:40 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Michael Nguyen <michaeln
twentyten.org> wrote:
| So... I have these good sized mail servers and as a precaution, I back up
| user mailboxes every night. I currently use rsync which works fine, but it
| just takes sooooooooo long for rsync to do its thing. What's the best way
| to backup maildirs? What do you guys do?
|
Well, what i did:
#!/bin/bash
## bac_mail.sh
cd /backups
ARCHIVE="Maildir-$(date '+%Y-%m-%d').tgz"
tar czf "$ARCHIVE" /home/mess/Maildir &> /dev/null
ls -1 Maildir-[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9].tgz | \
grep -v -F "$ARCHIVE" | xargs rm -f
Then add the command to /etc/profile.
sh ~/where_youre_command-file_is/bac_mail.sh
mess-mate
--
Your life would be very empty if you had nothing to regret.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]