Skip to content

fix: use RESTIC_HOST for restic snapshots - #313

Merged
itzg merged 1 commit into
itzg:masterfrom
w3lld1:fix/restic-host-env
Aug 3, 2026
Merged

fix: use RESTIC_HOST for restic snapshots#313
itzg merged 1 commit into
itzg:masterfrom
w3lld1:fix/restic-host-env

Conversation

@w3lld1

@w3lld1 w3lld1 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • I switched the backup script to Restic's native RESTIC_HOST environment variable and removed redundant --host arguments.
  • I kept RESTIC_HOSTNAME as a backward-compatible fallback when RESTIC_HOST is not set.
  • I updated the Restic integration test to verify that the legacy variable still selects the snapshot host, and documented the preferred variable.

Validation

  • bash -n scripts/opt/backup-loop.sh tests/test.simple.restic.sh
  • ad-hoc one-shot mock-Restic harness covering native-variable precedence, legacy fallback, environment propagation, and absence of --host
  • git diff --check origin/master...HEAD

I deferred the Docker image build and full Restic integration test to CI because the repository workflow performs a full container build before running it.

Fixes #301

@itzg itzg left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@itzg itzg added the enhancement New feature or request label Aug 3, 2026
@itzg
itzg merged commit 438b97f into itzg:master Aug 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use RESTIC_HOST instead of RESTIC_HOSTNAME

2 participants