Hi everyone,
I'm a longtime dirvish user. Recently I moved and decided to remove one
of my computers, which was my home server that ran dirvish.
I finally replaced it with a NAS on which I now started running dirvish
again, after about ten months.
There is one thing that trips me up about expiry rules. Basically the
manual says that it will not expire an image unless a successful
non-expired image is found.
In practice, what that means is that it keeps none of the old 'possibly
expired' ones as soon I have at least one recent successful backup.
I find this counterintuitive - if I have a ten month gap, I would
definitely want to keep some of the older backups around just in case.
I guess in essence, for each rule I have defined, it should keep as many
successful matching backups around as that rule suggest I should have.
I'm not sure I'm explaining this right, though. I ran into a similar
doubt when I had a few failed backups (because my laptop changed ip) -
the first successful new backup triggered expire of the good backups
before the failed backups.
In my particular case, I have these rules:
expire-default: +15 days
expire-rule:
# MIN HR DOM MON DOW STRFTIME_FMT
# by default saturday backups are kept for a month
* * * * sat +3 months
# first saturday of a month is kept for a year
* * 1-7 * sat +1 year
# backup made first saturday of each quarter is kept forever
* * 1-7 1,4,7,10 sat never
# if the backup is made between 10 and 20, expire after 4 days
### * 10-20 * * * +4 days
And here is what happened to one vault:
nas:~# ls /c/dirvish/nueve-home-user/
20100102030000 20100529030000 20100615030000 20100621030000
20110228030000
20100206030000 20100605030000 20100616030000 20100622030000
20110302030000
20100306030000 20100611030000 20100617030000 20100623030000
20110314030000
20100508030000 20100612030000 20100618030000 20100624030000
20110315030000
20100515030000 20100613030000 20100619030000 20100625030000 dirvish
20100522030000 20100614030000 20100620030000 20100626030000
nas:~# dirvish-expire --vault nueve-home-user
Expiring images as of 2011-03-15 21:55:14
Restricted to vault nueve-home-user
VAULT:BRANCH IMAGE CREATED EXPIRED
nueve-home-user:default 20100621030000 +15 days ==
2010-07-06 03:00
nueve-home-user:default 20100625030000 +15 days ==
2010-07-10 03:00
nueve-home-user:default 20100612030000 +2 months ==
2010-08-12 03:00
nueve-home-user:default 20100613030000 +15 days ==
2010-06-28 03:00
nueve-home-user:default 20100622030000 +15 days ==
2010-07-07 03:00
nueve-home-user:default 20100611030000 +15 days ==
2010-06-26 03:00
nueve-home-user:default 20100614030000 +15 days ==
2010-06-29 03:00
nueve-home-user:default 20100616030000 +15 days ==
2010-07-01 03:00
nueve-home-user:default 20100306030000 +1 year ==
2011-03-06 03:00
nueve-home-user:default 20100620030000 +15 days ==
2010-07-05 03:00
nueve-home-user:default 20100619030000 +2 months ==
2010-08-19 03:00
nueve-home-user:default 20100529030000 +2 months ==
2010-07-29 03:00
nueve-home-user:default 20100623030000 +15 days ==
2010-07-08 03:00
nueve-home-user:default 20100624030000 +15 days ==
2010-07-09 03:00
nueve-home-user:default 20100206030000 +1 year ==
2011-02-06 03:00
nueve-home-user:default 20100615030000 +15 days ==
2010-06-30 03:00
nueve-home-user:default 20100522030000 +2 months ==
2010-07-22 03:00
nueve-home-user:default 20100515030000 +2 months ==
2010-07-15 03:00
nueve-home-user:default 20100618030000 +15 days ==
2010-07-03 03:00
nueve-home-user:default 20100617030000 +15 days ==
2010-07-02 03:00
nueve-home-user:default 20100508030000 2010-05-08 09:06 +2 months ==
2010-07-08 03:00
nueve-home-user:default 20100626030000 2010-06-26 18:59 +2 months ==
2010-08-26 03:00
nueve-home-user:default 20110228030000 2011-02-28 23:46 +15 days ==
2011-03-15 03:00
nas:~#
nas:~#
nas:~#
nas:~#
nas:~#
nas:~#
nas:~# ls /c/dirvish/nueve-home-user/
20100102030000 20110302030000 20110315030000
20100605030000 20110314030000 dirvish
(In this last ls, the two 2010* backups were actually failed backups)
So, in essence (although the output from -expire is not very clear to
me), it deleted all successful old backups, and only kept three
successful backups made in the last two weeks (I've been running it
manually for various reasons as I make sure my NAS can handle the
backups).
Now, given my rules, what I would like to have happen instead is:
- keep at least one quarterly from the successful backups since forever
- keep at least one montly from the successful backups since a year ago
Is there any way to achieve what I want, or is just not how dirvish
works ?
THanks
Thomas
--
--
The clock is set for nine but you know you're gonna make it eight
All the people that you've loved they're all bound to leave some
keepsakes
I've been swinging all the time, think it's time I learned your ways
--
URGent, best radio on the net - 24/7 !
http://urgent.fm/
_______________________________________________
Dirvish mailing list
[email protected]
http://www.dirvish.org/mailman/listinfo/dirvish