[Dirvish] expire rules

Terry terry at firstkmh.co.uk
Mon Jul 28 10:06:04 UTC 2014


>> expire-rule:
>> wday { friday } +60 days
>> mday { 1 } +6 months
> The entries for the expire-rule list must be indented to distinguish
> them from a next option.
>
> I don't know what the default is, if there aren't any expire rules
> found... probably "never". That doesn't explain the 4 and 15 days
> though.
>
>
> Paul

I just tried it on a vault with no expire rule setup

# dirvish-expire --dry-run --vault vault1
Expiring images as of 2014-07-28 10:31:34
Restricted to vault vault1

VAULT:BRANCH    IMAGE           CREATED           EXPIRED
vault1:default 20140712193503  2014-07-12 19:45  +4 days == 2014-07-16 19:35
vault1:default 20140713193444  2014-07-13 19:46  +4 days == 2014-07-17 19:34
vault1:default 20140714194627  2014-07-14 20:04  +4 days == 2014-07-18 19:46
vault1:default 20140715201002  2014-07-15 20:32  +4 days == 2014-07-19 20:10
vault1:default 20140716203051  2014-07-16 20:37  +4 days == 2014-07-20 20:30
vault1:default 20140717195212  2014-07-17 20:06  +4 days == 2014-07-21 19:52
vault1:default 20140718200653  2014-07-18 20:40  +4 days == 2014-07-22 20:06
vault1:default 20140719200057  2014-07-19 20:29  +4 days == 2014-07-23 20:00
vault1:default 20140720193443  2014-07-20 19:41  +4 days == 2014-07-24 19:34
vault1:default 20140721193159  2014-07-21 19:53  +4 days == 2014-07-25 19:31
vault1:default 20140722193447  2014-07-22 19:55  +4 days == 2014-07-26 19:34
---------------------------------------------------------------
# more vault1/dirvish/default.conf
client: root at tt.zapto.org
index: text
exclude:
         snapshots

tree: /usr/server-shares
xdev: 0
--------------------------------------------------------------
# more /usr/local/etc/dirvish/master.conf
log: text



index: text
xdev: 1

exclude:
         /dev


bank:
         /usr/server-shares/backups/dirvish/bank0

Runall:
     vault1
     vault2
     vault3
--------------------------------------------------------------------
# ls -al vault1/
total 5527252
drwxr-xr-x  20 root  wheel        6656 Jul 27 19:23 .
drwxr-xr-x  12 root  wheel         512 Jan 31 14:44 ..
-rw-r--r--   1 root  wheel  5658374068 Oct 18  2013 20130917172205.tar.gz
drwxr-xr-x   3 root  wheel         512 Jun  2 06:38 20140601212756
drwxr-xr-x   3 root  wheel         512 Jul 12 19:45 20140712193503
drwxr-xr-x   3 root  wheel         512 Jul 13 19:46 20140713193444
drwxr-xr-x   3 root  wheel         512 Jul 14 20:04 20140714194627
drwxr-xr-x   3 root  wheel         512 Jul 15 20:32 20140715201002
drwxr-xr-x   3 root  wheel         512 Jul 16 20:37 20140716203051
drwxr-xr-x   3 root  wheel         512 Jul 17 20:06 20140717195212
drwxr-xr-x   3 root  wheel         512 Jul 18 20:40 20140718200653
drwxr-xr-x   3 root  wheel         512 Jul 19 20:29 20140719200057
drwxr-xr-x   3 root  wheel         512 Jul 20 19:41 20140720193443
drwxr-xr-x   3 root  wheel         512 Jul 21 19:53 20140721193159
drwxr-xr-x   3 root  wheel         512 Jul 22 19:55 20140722193447
drwxr-xr-x   3 root  wheel         512 Jul 23 20:00 20140723194510
drwxr-xr-x   3 root  wheel         512 Jul 24 20:53 20140724205000
drwxr-xr-x   3 root  wheel         512 Jul 25 20:15 20140725201213
drwxr-xr-x   3 root  wheel         512 Jul 26 19:26 20140726192405
drwxr-xr-x   3 root  wheel         512 Jul 27 19:26 20140727192357
drwxr-xr-x   2 root  wheel         512 Jun 19  2012 dirvish

If I put

expire-default: +15 days to test

in either master.conf or default.conf it is ignored

So I just looked at the summary file in some of the backups and it contains this
Expire: +4 days == 2014-07-16 19:22:07
Expire-rule: *   10-20 *   *         *    +4 days


so that solves that one
so at some point with my experimenting I must have made a mistake but wouldn't either master.conf or default.conf over rule that ?

Terry











More information about the Dirvish mailing list