Skip to content

borg create: add --hostname/--username/--tags#9464

Merged
ThomasWaldmann merged 2 commits intoborgbackup:masterfrom
ThomasWaldmann:create-set-metadata
Mar 11, 2026
Merged

borg create: add --hostname/--username/--tags#9464
ThomasWaldmann merged 2 commits intoborgbackup:masterfrom
ThomasWaldmann:create-set-metadata

Conversation

@ThomasWaldmann
Copy link
Member

  • Added --hostname and --username command-line options to borg create
  • Updated Archive to capture and store these explicit values, falling back to system defaults
  • Added test_explicit_hostname_and_username to verify the functionality

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.36%. Comparing base (871c89b) to head (5f4e921).
⚠️ Report is 6 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9464      +/-   ##
==========================================
+ Coverage   83.30%   83.36%   +0.05%     
==========================================
  Files          87       87              
  Lines       15423    15441      +18     
  Branches     2310     2313       +3     
==========================================
+ Hits        12848    12872      +24     
+ Misses       1822     1819       -3     
+ Partials      753      750       -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ThomasWaldmann ThomasWaldmann changed the title borg create: allow specifying hostname and username explicitly, fixes #9402 borg create: add --hostname/--username, fixes #9402 Mar 11, 2026
- Added `--hostname` and `--username` command-line options to `borg create`
- Updated Archive to capture and store these explicit values, falling back to system defaults
- Added `test_explicit_hostname_and_username` to verify the functionality
@ThomasWaldmann ThomasWaldmann changed the title borg create: add --hostname/--username, fixes #9402 borg create: add --hostname/--username/--tags, fixes #9401, fixes #9402 Mar 11, 2026
@ThomasWaldmann ThomasWaldmann changed the title borg create: add --hostname/--username/--tags, fixes #9401, fixes #9402 borg create: add --hostname/--username/--tags Mar 11, 2026
- add `--tags TAG [TAG ...]` option to `borg create` to tag newly created archives.
- validate the tags exactly like `borg tag` does, including checking that any special tags starting with `@` are known `SPECIAL_TAGS`.
- add `test_create_tags` and `test_create_invalid_tags` to ensure proper behavior.
@ThomasWaldmann ThomasWaldmann merged commit 7f7e606 into borgbackup:master Mar 11, 2026
19 of 20 checks passed
@ThomasWaldmann ThomasWaldmann deleted the create-set-metadata branch March 11, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant