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

Automatically resolve the system hostname when running forget #405

Open
PHLAK opened this issue Oct 21, 2024 · 0 comments
Open

Automatically resolve the system hostname when running forget #405

PHLAK opened this issue Oct 21, 2024 · 0 comments

Comments

@PHLAK
Copy link

PHLAK commented Oct 21, 2024

Is your feature request related to a problem? Please describe.

I'm attempting to set up autorestic on multiple systems sharing one common (B2) backend. When running autorestic forget I'd like the system's hostname to be automatically resolved and passed to the --host option so that only snapshots for the current host will be forgot/pruned.

From the Removing Backup Snapshots documentation.

you can restrict the policy to only process snapshots which have a particular hostname with the --host parameter, or tags with the --tag option.

Describe the solution you'd like

Allow host: true (or host: auto) to be passed under the forget configuration. When set to true (or auto) it would automatically resolve the current system's hostname and pass that value as the --host option value.

Currently works

global:
  forget:
    host: my-hostname # Passes '--host my-hostname'

Desired solution

global:
  forget:
    host: true # Resolves the current host name and passes it as '--host <current_hostname>'
@PHLAK PHLAK changed the title Scope forget pruning to the current host (i.e. use --host option) Automatically resolve the system hostname when running forget Oct 21, 2024
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

No branches or pull requests

1 participant