[H-GEN] chestnut

David Jericho david.jericho at bytecomm.com.au
Wed Mar 26 23:33:15 EST 2003


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

On Thu, Mar 27, 2003 at 01:36:04PM +1000, Sarah Hollings wrote:
> 45 6 * * * tar cjf /var/backups/disk2/$(date +%d-%m-%Y)-mail.tar.bz2 
> /home/imap

Yeach, very icky.

You could always use rsync, it's neat for this type of operation
(especially locally).

mkdir /var/backups/disk2/current
mkdir -p /var/backups/disk2/old/$(date +%d-%m-%Y)

cd /var/backups/disk2/current
rsync -av --delete -b \ 
    --backup-dir /var/backups/disk2/old/$(date +%d-%m-%Y) \
    /home/imap /var/backups/disk2/current/

Basically, what will be the case is /var/backups/disk2/current will
always (assuming the script runs right) be a current copy. Any files
that change or are deleted along the way will move into the
.../old/date directories.

I use it for caching some systems onto a disk spool around here,
and it's does it excellently.

> Its very handy, but pretty yukky as at present when it fails (not enough 
> room on the disk) I get an email and I remove "a few".  ;-)

The problem being of course that you're making many redundant copies
of everything. The above config will reduce that quite significantly,
and running another script after to package or compress the archives
will significantly reduce volume.

The upside is that there will only ever be one copy of the particular
mail object. The downside is that there will only ever be one copy of
the particular mail object. And it does best work on Maildir
folders[1].

[1] You are using Maildir right? I mean, you are using Maildir?
No, I'm serious, you're using Maildir right?[2]

[2] For so many reasons, but a single 200MB mbox file is a drain on
    resources, no matter how you look it.[3]
   
[3] An office full of Outlook users.

-- 
David Jericho


--
Scanned and found clear of viruses by EntireScan.  http://www.entirescan.com/

--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list