Why not change your expire rule-set in such a way that it expires eg. the
backup of each 'first saturday of a month' after a year?



expire-default: +35 days

expire-rule:
        mday    { 8-31 }        +35     days
        mday    { 1-7 }         +370    days
        wday    { mon-sat }     +7      days

This way daily backups expire after a week, except for
 - Sundays, which expire after five weeks;
 - First Sunday of the month wich expires after 370 days.

This is the rule set I use at home. It should simply change to your likings.

Hope this helps,

JP


[email protected] wrote:
Send Dirvish mailing list submissions to
	[email protected]

To subscribe or unsubscribe via the World Wide Web, visit
	http://www.dirvish.org/mailman/listinfo/dirvish
or, via email, send a message with subject or body 'help' to
	[email protected]

You can reach the person managing the list at
	[email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Dirvish digest..."


Today's Topics:

   1. Multiple banks and multiple dirvish instances (hanj)
   2. Re: Multiple banks and multiple dirvish instances (Paul Slootman)


----------------------------------------------------------------------

Message: 1
Date: Wed, 24 Feb 2010 08:29:58 -0700
From: hanj <[email protected]>
Subject: [Dirvish] Multiple banks and multiple dirvish instances
To: [email protected]
Message-ID: <20100224082958.3005f...@ares>
Content-Type: text/plain; charset=US-ASCII

Hello

I'm currently running dirvish on 'backup' linux box on my network. On
that box there are multiple banks and things are backing up nicely (5
weeks of images / vault).

What I need to do is create a separate backup that backs up once per
month and expires after one year. So, I still want my 5 week backups on
various servers. Nothing changes there. But I'm trying to create a
yearly bank where I'm backing up the same same servers once a month and
expiring after one year. So those vaults will only have 12 images for
each server.

I was thinking of adding something to /etc/cron.monthly, but I'm having
trouble telling dirvish to use a different master.conf where bank and
vault options are. It seems to always reference
my /etc/dirvish.master.conf even if I supply a different config.

dirvish --init --vault server1 -config /etc/dirvish/master-monthly.conf

I always get server1:default:20100224: Error: image 2010224 already
exists in /bank/server1

It's referring to /bank which is in /etc/dirvish/master.conf, not my
monthly. My yearly bank is elsewhere. I feel like there is a really
easy way of doing this, so I thought I should stop and ask first.

thanks!
hanji


------------------------------

Message: 2
Date: Wed, 24 Feb 2010 17:15:56 +0100
From: Paul Slootman <[email protected]>
Subject: Re: [Dirvish] Multiple banks and multiple dirvish instances
To: Dirvish user and developer mailing list <[email protected]>
Message-ID: <[email protected]>
Content-Type: text/plain; charset=us-ascii

On Wed 24 Feb 2010, hanj wrote:
  
What I need to do is create a separate backup that backs up once per
month and expires after one year. So, I still want my 5 week backups on
various servers. Nothing changes there. But I'm trying to create a
yearly bank where I'm backing up the same same servers once a month and
expiring after one year. So those vaults will only have 12 images for
each server.
    

So, a separate bank for those monthly images?

  
I was thinking of adding something to /etc/cron.monthly, but I'm having
trouble telling dirvish to use a different master.conf where bank and
vault options are. It seems to always reference
my /etc/dirvish.master.conf even if I supply a different config.
    

The key here is that dirvish _always_ reads the master.conf first,
even if you specify --config.

You could move the bank specifications to a daily config file, and
always specify the daily config file via --config, and using the monthly
config file when making the monthly image.

Personally I would instead create a script to copy the latest daily
image to the monthly bank _after_ creating the daily image. That way the
client isn't being accessed twice for the same data. Of course if you're
backing up the local system, that doesn't matter much; if you're going
over the network things may be different.

Something like:

----------------snip-------------------
#!/bin/sh

set -e

MONTHLY=/banks/monthly
DAILY=/banks/daily
IMAGES='foo bar'

for i in $IMAGES; do
    cd $DAILY/$i
    newest=`ls -t | head -n 1`
    if [ -d $newest ]; then
        previous=`ls -t $MONTHLY/$i | head -n 1`
        if [ -d $MONTHLY/$i/$previous ]; then
            rsync -aH --link-dest=$MONTHLY/$i/$previous/ $newest $MONTHLY/$i/
        fi
    fi
fi
----------------snip-------------------

Totally untested :-)


Paul


------------------------------

_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish


End of Dirvish Digest, Vol 63, Issue 2
**************************************

  
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish

Reply via email to