feature-request: format-string-like fields like %h for host or %u for username
- Dominant language
- Perl
- Stars
- 2.1k
- Forks
- 139
- PR merge metrics
- No merged PRs in 30d
Description
Hey.
For pathnames, and there especially for the target pathnames it would be nice if one had format-string-like fields.
Consider e.g. on has multiple hosts that run backups all to one backup server and one wants to use an identical `btrbk.conf` for all of them.
It would be nice if one could say e.g.:
```
volume /mnt/root-fs
subvolume data
target raw ssh://backuphost.example.org/data/btrbk/%h
```
and that would automatically resolve to the FQDN of the sending host.
Similar, one could use `%s` for the short hostname, `%u` for the sending username (not sure whether that would make sense in practise).
For the other way round, i.e. a backup host pulling volumes from remote to local, the same could be done, and e.g. the hostname taken from the current section’s `ssh://` URI.
Fields for that could use capital letters instead (e.g.`%H` for FQDN).
The reason why I'd differ, and not just use `%h` for both is, that someday `btrbk` might wish to implement "3rd party" functionality, where `btrbk` runs on a host, which is neither source, nor target, but just initiates the stuff on both sides.
Cheers,
Chris.
Contributor guide
No contributing guide indexed for this repository
Research direction
No files, tests, or entry points are named. Start by locating the configuration and pathname-expansion code, then define how placeholders resolve for sending, pulling, and possible third-party operation; done means documented, tested expansion for the proposed host and username fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cli, devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100