[Borgbackup] Pruning Schedule Not Working as Expected

Blu Finney me at blufinney.com
Wed Mar 21 00:56:44 EDT 2018


Now that I've been running backups with pruning using the configuration
mentioned in this thread, I'm seeing unexpected results again - based
on my new understanding.

To recap, I've been running the backup/prune every three hours since
March 5th.  Borg list currently gives the results below.  I don't
understand why at least one day from week of Mar 4th wasn't kept?
(based on "keep_weekly: 4")

borg-2018-03-11T21:10:14        Sun, 2018-03-11 21:10:20
borg-2018-03-12T22:31:26        Mon, 2018-03-12 22:31:33
borg-2018-03-13T21:10:09        Tue, 2018-03-13 21:10:15
borg-2018-03-14T21:11:14        Wed, 2018-03-14 21:11:20
borg-2018-03-15T21:14:58        Thu, 2018-03-15 21:15:05
borg-2018-03-16T21:11:07        Fri, 2018-03-16 21:11:13
borg-2018-03-17T21:11:35        Sat, 2018-03-17 21:11:40
borg-2018-03-18T06:11:52        Sun, 2018-03-18 06:11:57
borg-2018-03-18T09:10:08        Sun, 2018-03-18 09:10:14
borg-2018-03-18T12:11:18        Sun, 2018-03-18 12:11:24
borg-2018-03-18T15:10:59        Sun, 2018-03-18 15:11:05
borg-2018-03-18T18:11:03        Sun, 2018-03-18 18:11:09
borg-2018-03-18T21:10:59        Sun, 2018-03-18 21:11:05
borg-2018-03-19T00:06:05        Mon, 2018-03-19 00:06:11
borg-2018-03-19T06:11:47        Mon, 2018-03-19 06:11:53
borg-2018-03-19T09:10:16        Mon, 2018-03-19 09:10:22
borg-2018-03-19T12:11:14        Mon, 2018-03-19 12:11:20
borg-2018-03-19T15:11:03        Mon, 2018-03-19 15:11:08
borg-2018-03-19T18:10:55        Mon, 2018-03-19 18:11:01
borg-2018-03-19T21:11:12        Mon, 2018-03-19 21:11:18
borg-2018-03-20T00:06:05        Tue, 2018-03-20 00:06:12
borg-2018-03-20T12:11:39        Tue, 2018-03-20 12:11:45
borg-2018-03-20T15:10:14        Tue, 2018-03-20 15:10:19
borg-2018-03-20T18:11:10        Tue, 2018-03-20 18:11:16
borg-2018-03-20T21:11:10        Tue, 2018-03-20 21:11:16




-----Original Message-----
From: Blu Finney <me at blufinney.com>
To: Elladan <elladan at eskimo.com>
Cc: borgbackup at python.org
Subject: Re: [Borgbackup] Pruning Schedule Not Working as Expected
Date: Wed, 14 Mar 2018 23:57:56 -0700

Yep, in addition to a couple other fine tunings.  After spending some
time thinking about it I used the following.  After pruning with these
new settings the results matched what I was ultimately shooting for.

    keep_within: 3H
    keep_hourly: 16
    keep_daily: 7
    keep_weekly: 4
    keep_monthly: 12
    keep_yearly: 5


-----Original Message-----
From: Elladan <elladan at eskimo.com>
To: Blu Finney <me at blufinney.com>
Cc: borgbackup at python.org
Subject: Re: [Borgbackup] Pruning Schedule Not Working as Expected
Date: Wed, 14 Mar 2018 23:15:00 -0700

I'm not sure what your exact needs are, but my quick impression is
that just removing the --keep-minutely option and keeping the rest the
same will probably give you something approximating what you want.


On Wed, Mar 14, 2018 at 9:17 PM, Blu Finney <me at blufinney.com> wrote:
> You'll have to pardon me.  After thinking about this more I can
> understand why the "snapshot" mentality really doesn't apply here.
> 
> I'll have to spend some time doing some math to get the results I'm
> looking for.
> 
> Thanks for your help.
> 
> 
> -----Original Message-----
> From: Blu Finney <me at blufinney.com>
> To: Elladan <elladan at eskimo.com>
> Cc: borgbackup at python.org
> Subject: Re: [Borgbackup] Pruning Schedule Not Working as Expected
> Date: Wed, 14 Mar 2018 21:06:21 -0700
> 
> Thank you for the simple explanation.  I totally misunderstood the
> documentation - I think because of my "snapshot" mindset (like good
> ole
> sun zfs).
> 
> Here I thought "--keep-hourly 24" meant keep archives from the past
> 24
> hours, and "--keep-minutely 60" meant keep archives from the past 60
> minutes, and so on.
> 
> Is there a way to implement the snapshot mentality using "--keep-
> within"?
> 
> e.g.
> --keep-within 60M --keep-within 24H --keep-within 7D ...
> 
> 
> Sorry for the sophmoric question, I'm really having a hard time
> wrapping my head around the "--keep-hourly X" way of thinking in
> order
> to achieve the results I'm looking for.
> 
> 
> -----Original Message-----
> From: Elladan <elladan at eskimo.com>
> To: Blu Finney <me at blufinney.com>
> Cc: borgbackup at python.org
> Subject: Re: [Borgbackup] Pruning Schedule Not Working as Expected
> Date: Wed, 14 Mar 2018 19:42:22 -0700
> 
> On Wed, Mar 14, 2018 at 7:01 PM, Blu Finney <me at blufinney.com> wrote:
> > 
> > Hi,
> > 
> > I've been using Borg backup since Mar 5th and am not clear why the
> > pruning schedule isn't working as expected.
> > 
> > Details:
> > - Running backup every 3 hours (8 archives created per day)
> > - Pruning command used: borg prune :: --keep-within 3H --keep-
> > minutely
> > 60 --keep-hourly 24 --keep-daily 7 --keep-weekly 4 --keep-monthly
> > 12
> > --
> > keep-yearly 1 --prefix {hostname}- --debug --stats --list
> > 
> > Using these prune settings I was expecting some of the 8 daily
> > archives
> > to have been pruned by now.  Yet none have been pruned.
> > 
> > Have I misunderstood or misconfigured something?
> 
> You've basically asked borg prune to do this (rules applied one after
> another):
> 
> 1. Keep all archives in the last 3 hours.
> 2. Keep the last 60 archives, but not more than one per minute.
> 3. Keep the last the last 24 archives, but not more than one per
> hour.
> 
> And so on. So basically, you've asked it to keep a very large number
> of archives.
> _______________________________________________
> Borgbackup mailing list
> Borgbackup at python.org
> https://mail.python.org/mailman/listinfo/borgbackup

_______________________________________________
Borgbackup mailing list
Borgbackup at python.org
https://mail.python.org/mailman/listinfo/borgbackup
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/borgbackup/attachments/20180320/b2dae81b/attachment.sig>


More information about the Borgbackup mailing list