There are some useful scenarios when it is desirable to run borg on machine A (hostname A) to perform some tasks as machine B (hostname B). Currently there is no easy way to override the hostname.
Like #9402 it will be very useful if you can support (for borg 1.4.x)
- Overriding hostname for a particular borg run via a command line option (like
--hostname)
- Use a predefined environment variable (if it is defined/exists) (say
BORG_HOST or BORG_HOSTNAME or BORG_HOSTNAME_OVERRIDE) and use that as the hostname instead.
Please support both options above.
An example scenario where this hostname override will be very useful is:
SHARED_REPO - shared repository being used to backup multiple hosts (to take advantage of dedup)
SINGLE_REPO - repo used to backup only from one host
Laptop L backs up data to SHARED_REPO (and possibly it's own SINGLE_REPO). Laptop L is not guaranteed to be online all the time and so backups are "opportunistic" and will happen when there is network connectivity and the Laptop is online/awake (not suspended).
Desktop D runs all the time (or reliably and predictably at fixed times with network connectivity) and backups to SHARED_REPO.
Desktop D will handle the pruning, compacting and repository checks on behalf of Laptop L (since these could be "long" operations where a reliable network is desired) for both SHARED_REPO and Laptop L's SINGLE_REPO.
By running borg on Desktop D (impersonating Laptop L), this becomes fairly straightforward to handle.
There are also other more involved setups where this is really useful. Laptops and End user machines that can ONLY perform backups - append only operation to shared repositories. Backup "Hosts" where repo read+write operations like prune, compact and checks happen. Allowing hostname overrides will allow for per hostname prune configurations and customizations making them easier to manage centrally).
There are some useful scenarios when it is desirable to run borg on machine A (hostname A) to perform some tasks as machine B (hostname B). Currently there is no easy way to override the hostname.
Like #9402 it will be very useful if you can support (for borg 1.4.x)
--hostname)BORG_HOSTorBORG_HOSTNAMEorBORG_HOSTNAME_OVERRIDE) and use that as the hostname instead.Please support both options above.
An example scenario where this hostname override will be very useful is:
SHARED_REPO - shared repository being used to backup multiple hosts (to take advantage of dedup)
SINGLE_REPO - repo used to backup only from one host
Laptop L backs up data to SHARED_REPO (and possibly it's own SINGLE_REPO). Laptop L is not guaranteed to be online all the time and so backups are "opportunistic" and will happen when there is network connectivity and the Laptop is online/awake (not suspended).
Desktop D runs all the time (or reliably and predictably at fixed times with network connectivity) and backups to SHARED_REPO.
Desktop D will handle the pruning, compacting and repository checks on behalf of Laptop L (since these could be "long" operations where a reliable network is desired) for both SHARED_REPO and Laptop L's SINGLE_REPO.
By running borg on Desktop D (impersonating Laptop L), this becomes fairly straightforward to handle.
There are also other more involved setups where this is really useful. Laptops and End user machines that can ONLY perform backups - append only operation to shared repositories. Backup "Hosts" where repo read+write operations like prune, compact and checks happen. Allowing hostname overrides will allow for per hostname prune configurations and customizations making them easier to manage centrally).