borg-tag(1)

πŸ“¦
version 2.0.0b25 Β· 3 versions
, in ubuntu stonking

✨ borg-tag(1) β€” the borg backup tool's tag manager ✨

okay bestie, pull up a chair, we're talking borg-tag πŸ’– (full name: borg-tag, from the borg backup tool fam)

🌸 NAME 🌸

borg-tag β€” manage tags. that's it, that's the whole vibe. tags for your archives. iconic.


πŸ¦‹ SYNOPSIS πŸ¦‹

borg [common options] tag [options] [NAME]

πŸ’… DESCRIPTION πŸ’…

so basically: manage archive tags. yes, archives have tags now, we love that for them.

Borg archives can have a whole set of tags, and those tags are what you use for matching archives. like a little name-tag party but for backups.

You've got two moods here: you can set the tags to one specific exact set, or you can add / remove tags from whatever set is already there. both are valid, pick your fighter.

now, important rules, no cap:

  • User-defined tags must NOT start with @ 🚫 because tags starting with @ are considered special, and users are only allowed to use the known special tags. it's a members-only club.
  • The one special tag in the house: @PROT β€” this protects archives against archive deletion or pruning. it's giving bodyguard energy 🫢
⚠️ Pre-existing special tags cannot be removed via --set. You can still use --set, but you must also give the pre-existing special tags so they don't get yeeted. If they are not given, borg emits a warning and does not set the tags of that archive. so pay attention bestie, or nothing happens and you'll be confused 😭
  • --clear removes all normal tags, but keeps special tags. Combined with --add, it replaces the normal tags. lowkey a glow-up maneuver ✨

To change tags, you must select the archives: give an archive NAME or use archive filter options like --match-archives. To change the tags of all archives, use --match-archives 'sh:*'. all of them. every single one. main character energy but for the whole archive collection πŸ‘‘

Each of --set, --add and --remove takes exactly one tag. To give multiple tags, use the option multiple times. stack 'em like bracelets πŸ’œ

Examples:

# add the tags "important" and "keep" to the archive with the given ID
$ borg tag --add important --add keep aid:1ddaae55

# remove the tag "keep" from all archives named "home"
$ borg tag --remove keep --match-archives home

# set the tags of the archive with the given ID to exactly "foo" and "bar"
$ borg tag --set foo --set bar aid:1ddaae55

# remove all normal tags (but not special tags like @PROT) from the archive with the given ID
$ borg tag --clear aid:1ddaae55

# protect the archive with the given ID against deletion and pruning
$ borg tag --add @PROT aid:1ddaae55

πŸŽ€ OPTIONS πŸŽ€

See borg-common(1) for common options of Borg commands. (the shared lore, iykyk)

arguments πŸ“Ž

  • NAME β€” specify the archive name

options πŸ”₯

  • --set TAG β€” set tags (can be given multiple times)
  • --clear β€” remove all normal tags (keep special tags)
  • --add TAG β€” add tag (can be given multiple times)
  • --remove TAG β€” remove tag (can be given multiple times)

Archive filters 🧚

  • -a PATTERN, --match-archives PATTERN β€” only consider archives matching all patterns. See "borg help match-archives".
  • --sort-by KEYS β€” Comma-separated list of sorting keys; valid keys are: timestamp, archive, name, id, tags, host, user; default is: timestamp
  • --first N β€” consider the first N archives after other filters are applied
  • --last N β€” consider the last N archives after other filters are applied
  • --oldest TIMESPAN β€” consider archives between the oldest archive's timestamp and (oldest + TIMESPAN), e.g., 7d or 12m.
  • --newest TIMESPAN β€” consider archives between the newest archive's timestamp and (newest - TIMESPAN), e.g., 7d or 12m.
  • --older TIMESPAN β€” consider archives older than (now - TIMESPAN), e.g., 7d or 12m.
  • --newer TIMESPAN β€” consider archives newer than (now - TIMESPAN), e.g., 7d or 12m.

⭐ SEE ALSO ⭐


πŸ‘‘ AUTHOR πŸ‘‘

The Borg Collective β€” they ate, fr fr. πŸ’–


okay bestie that's the whole page, you're officially tagged and protected 🫢 this was borg-tag(1) from the borg backup tool, dated 2026-10-07 β€” go forth and tag responsibly, mwah πŸ’…βœ¨πŸŒΈ

πŸ“¦ where this page comes from