Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

borg2: implement tag command #8425

Closed
ThomasWaldmann opened this issue Sep 26, 2024 · 4 comments
Closed

borg2: implement tag command #8425

ThomasWaldmann opened this issue Sep 26, 2024 · 4 comments
Assignees
Labels
Milestone

Comments

@ThomasWaldmann
Copy link
Member

ThomasWaldmann commented Sep 26, 2024

As borg2 is now using all archive metadata directly from the archive object, having some more metadata in there would be useful.

CLI interface could look like this:

borg tag aid:<archive_id> --add TAG1 --add TAG2
borg tag aid:<archive_id> --remove TAG1 --remove TAG2
borg tag aid:<archive_id> --set TAG1 --set TAG2  # replace all existing tags by given ones

Tag validation: only allow 0..9a..zA..Z- (specifically do not allow blank or comma)

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Sep 26, 2024

borg info --json <archive> can be used to write tests for this.

Later, to give the tags better visibility, borg repo-list's default format should grow a {tags:10} placeholder and the ArchiveFormatter class needs to support getting the tags from the Archive and formatting them as TAG1,TAG2,... (sorted).

@ThomasWaldmann
Copy link
Member Author

Selection based on tags for miscellaneous borg operations: see #8423.

@ThomasWaldmann
Copy link
Member Author

ThomasWaldmann commented Sep 26, 2024

I decided to do the low-level groundwork for this in #8426, so anyone taking this issue only needs to deal with the Archive.tags data structure (a set).

@ThomasWaldmann ThomasWaldmann changed the title borg2: implement tags borg2: implement tag command Sep 26, 2024
@ThomasWaldmann ThomasWaldmann self-assigned this Oct 2, 2024
@ThomasWaldmann
Copy link
Member Author

Fixed by #8449.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant