[Dirvish] How to keep monthly backups

Richard dirvish at rain4us.net
Mon Jan 25 14:44:16 UTC 2010


Dave Howorth wrote:
> Rich Shepard wrote:
>   
>> expire-rule:
>> #       MIN     HR      DOM     MON     DOW     STRFTIME_FMT
>>          *       *       *       *       1-7     +14 days
>>          *       *       *       1-12    *       +1 year
>>
>> The above says to keep daily backups for 14 days and monthly backups for a
>> year.
>>     
>
> Oops, hadn't even read the example. But this rule doesn't do what the
> text says. Check the man page and work through an example. A free pony
> for the best explanation.
>
>   
NOTE: This email best viewed as email was intended.  Text mode-fixed 
width font </steps off soapbox>

Since I want a pink pony (I hope they are available) I'm going to give 
this a shot.

expire-rule:
> #       MIN     HR      DOM     MON     DOW    STRFTIME_FMT
>          *       *       *       *       1-7     +14 days

In this line we have told dirvish that any backup on the days of the week between 1 and 7 (inclusive) we want to retain the dirvish vault image for 14 days.  The last fourteen days of our backups will not be expired when we run dirvish-expire.

> #       MIN     HR      DOM     MON     DOW    STRFTIME_FMT
>          *       *       *       1-12    *       +1 year

On this line we have told the system that any backups made in MONths 1-12 (inclusive) should be retained for 1 year.  The last 365 days of backups will not be expired when we run dirvish-expire.

If the intent was to retain monthly backups, I would recommend that we pick a Day Of the Month on which to retain the backup, such as the 1st of every month, and set the rule to flag those images to retain those monthlies for a year.

> #       MIN     HR      DOM     MON     DOW    STRFTIME_FMT
>          *       *       1       *       *     +1 year


Follow questions of my own.

*How would one retain monthly backups from the LAST day of each month?  Not all months have 31 days.
*How exactly does one specify the FIRST Sunday of each month?  Is it:
> #       MIN     HR      DOM     MON     DOW    STRFTIME_FMT
>          *       *       1       *       1     +1 year

*In 'man dirvish.conf' the example for expire-rule contained this statement:  "...the remaining nightlies are kept for 5 weeks."  I was unable to find that in the example provided in my man page (which I suppose I should paste here.)

            #MIN  HR    DOM   MON         DOW   EXPIRE
            *     *     *     *           1     +3 months
            *     *     1-7   *           su    +1 year
            *     *     1-7   1,4,7,10    1     never
            *     10-20 *     *           *     +10 days

-- 
Richard



More information about the Dirvish mailing list