Skip to content

prune ignore labels #138

@celogeek

Description

@celogeek

I'm trying vykar, and start using different labels as I'm saving many accounts and directories.

Here a short example of the issue:

config

repositories:
  - url: ./backup

encryption:
  passphrase: "secret"

retention:
  keep_daily: 7
  keep_weekly: 4

So I have 2 sources. One have the label "a" and the other the label "b"

When I run a backup

$ vykar backup a
Files: 1, Original: 2 B, Compressed: 37 B, Deduplicated: 37 B, Current: a
Snapshot created: 2fef13d7
  Source: a (label: a)
  Files: 1, Original: 2 B, Compressed: 37 B, Deduplicated: 37 B

$ vykar backup b
Files: 1, Original: 2 B, Compressed: 37 B, Deduplicated: 37 B, Current: b
Snapshot created: 94eb08da
  Source: b (label: b)
  Files: 1, Original: 2 B, Compressed: 37 B, Deduplicated: 37 B

$ vykar list
 ID        Date              Host             Label  Source  Files  Size
 2fef13d7  2026-05-10 16:23  MyHost  a      a           1  37 B
 94eb08da  2026-05-10 16:23  MyHost  b      b           1  37 B

But then if I run the prune command

$ vykar prune
Pruned 1 snapshots (kept 1), freed 2 chunks (168 B)

It only keep the last one no matter the label:

$ vykar list
 ID        Date              Host             Label  Source  Files  Size
 94eb08da  2026-05-10 16:23  MyHost  b      b           1  37 B

This setup (without sources), is what I would like to setup on a server.

I've got on this server vykar-server in append only, preventing any client to clean themself the repo,
And I've got a local client where I can run prune from time to time.

The issue, is that without the sources, the prune take all the labels as 1 source, and then apply the policy on it.

I've try to set a random sources like

sources:
  - path: z

And this time the prune preserve each label properly.

So I guess the tools has a bug when the sources is missing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions