[Borgbackup] understanding prune work

Adrian Klaver adrian.klaver at aklaver.com
Mon Feb 6 16:15:51 EST 2017


On 02/06/2017 10:38 AM, Maurice Libes wrote:
> hi to all
> new to borgbackup since a few weeks,
> I make some test on my own data and PC before  to set in production
>
> I make a backup by day, here below
> but when I say to only keep 7 days, I dont understand why borg want to
> prune the backup of pcml-2017-01-28  and keeping older one as
> pcml-2017-01-15 pcml-2017-01-22  ?

Because you have --keep-weekly=3. This will keep the last backup of each 
week going back 3 weeks. pcml-2017-01-15 and pcml-2017-01-22 are on 
Sundays which is the last day of an ISO week, so borgbackup is doing 
what you want.

>
> thanks for explanation, maybe I have set some trouble during multiples
> tests
>
> ML
>
> $ borg prune  --list --info --dry-run --keep-daily=7 --keep-weekly=3
> borg at borgserver.myuniv.fr:/mnt/provigo-borg/sauve-pcml  --prefix "pcml"
>
> Keeping archive: pcml-2017-02-06                      Mon, 2017-02-06
> 02:00:26
>
> Keeping archive: pcml-2017-02-05                      Sun, 2017-02-05
> 02:00:37
>
> Keeping archive: pcml-2017-02-04                      Sat, 2017-02-04
> 02:00:07
>
> Keeping archive: pcml-2017-02-03                      Fri, 2017-02-03
> 11:49:57
>
> Keeping archive: pcml-2017-01-31                      Tue, 2017-01-31
> 02:00:09
>
> Keeping archive: pcml-2017-01-30                      Mon, 2017-01-30
> 02:00:07
>
> Keeping archive: pcml-2017-01-29                      Sun, 2017-01-29
> 02:00:15
>
> Keeping archive: pcml-2017-01-22                      Sun, 2017-01-22
> 02:00:13
>
> Keeping archive: pcml-2017-01-15                      Sun, 2017-01-15
> 02:00:09
>
> Would prune:     pcml-2017-01-28                      Sat, 2017-01-28
> 02:00:07
>
> borg list borg at 139.124.2.149:/mnt/provigo-borg/sauve-pcml
>
> pcml-2017-01-15                      Sun, 2017-01-15 02:00:09
>
> pcml-2017-01-22                      Sun, 2017-01-22 02:00:13
>
> pcml-2017-01-28                      Sat, 2017-01-28 02:00:07
>
> pcml-2017-01-29                      Sun, 2017-01-29 02:00:15
>
> pcml-2017-01-30                      Mon, 2017-01-30 02:00:07
>
> pcml-2017-01-31                      Tue, 2017-01-31 02:00:09
>
> pcml-2017-02-03                      Fri, 2017-02-03 11:49:57
>
> pcml-2017-02-04                      Sat, 2017-02-04 02:00:07
>
> pcml-2017-02-05                      Sun, 2017-02-05 02:00:37
>
> pcml-2017-02-06                      Mon, 2017-02-06 02:00:26
>
>
>


-- 
Adrian Klaver
adrian.klaver at aklaver.com


More information about the Borgbackup mailing list