BackupPC-users

Re: [BackupPC-users] Different Blackout Periods

2015-04-03 10:16:20
Subject: Re: [BackupPC-users] Different Blackout Periods
From: Falko Trojahn <news AT trojahn DOT de>
To: "General list for user discussion, questions and support" <backuppc-users AT lists.sourceforge DOT net>
Date: Fri, 03 Apr 2015 15:56:07 +0200
Hello Alexander,

there's a slightly off-topic suggestion for you.

Alexander Rehbein wrote on 02.04.2015 11:25:
> You told something about an delta. Are diff backups better for me? I want to
> do the following:
>
> I have an Mailserver which should do a full backup every week. It could
> happen that I delete an email faulty, so I decided to backup the mails every
> hour. This I want do with incr backups. If a mail get lost I can restore
> this Mail from the backup archive.
>
> I've looked in the archive. Sometimes the incr backup is only 20mb,
> sometimes 200mb. Perhaps it is an better idea to only backup /var/vmail
> directory hourly instead of the full root path.

According to your needs, may be there is another possibility apart from 
stressing your mail server with hourly backups.

And, your statement "If a mail get lost I can restore this Mail from the 
backup archive." is only partly true. If  both the mail arrives and is 
deleted between two incremental backups, it will get lost, too.

So what can you do is: use the "always_bcc" feature of your MTA -
e.g. if you use dovecot with postfix, have a look at
http://www.postfix.org/ADDRESS_REWRITING_README.html#auto_bcc
and put it in master.cf in the cleanup process.

I assume your backuppc server is physically on another host.

There are several possibilities:

- send all incoming and outgoing mail of the server to one or several
   bcc accounts, using fetchmail on the backup host to fetch the mail
   and deliver it
   * to local account
   * to a file, e.g. using procmail

- send all incoming and outgoing mail per domain or per user
   directly to an archive host, which must not be the same as the
   backuppc host, but can
   => backup the archive host using backuppc as usual

Find attached an example .procmailrc which we use together with one 
incoming and one outgoing bcc account per server to split important mail 
from not so relevant ones. If there are several mail processes on
the server (content/antivirus filters etc.) make sure you generate the
bcc mails only once. The generated files can be gzipped at end of month,
and even archived (to fullfill the archiving duty in germany:
http://de.wikipedia.org/wiki/E-Mail-Archivierung  )


HTH
Falko

# === ~/.procmailrc ===
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin
MAILDIR=$HOME/Mail # Youd better make sure it exists
YEAR=`date "+%Y"`
MONTH=`date "+%m"`
DEFAULT=$MAILDIR/IN-$YEAR-$MONTH
# for outgoing control user:
# DEFAULT=$MAILDIR/OUT-$YEAR-$MONTH
LOGFILE=$MAILDIR/_maillog-$YEAR-$MONTH

:0:
* ^X-Spam-Status: Yes,.*$
SPAM-$YEAR-$MONTH

:0:
* ^X-Quarantine-ID: .*$
BADHEADER-$YEAR-$MONTH

:0:
* ^From: logcheck@
SYSTEM-$YEAR-$MONTH

:0:
* ^From: root@
SYSTEM-$YEAR-$MONTH

:0:
* ^List-Id: .*$
MAILINGLIST-$YEAR-$MONTH



------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/