Create detailed guide for testing backup restoration at three levels:
quick checks, service restoration, and full disaster recovery.
Changes:
- Add docs/RESTORE-TESTING.md with complete testing procedures
- Include 3 testing levels (monthly, quarterly, semi-annual)
- Document common restoration scenarios
- Provide troubleshooting guides and checklists
- Add RTO/RPO measurement guidelines
- Include report templates for each test level
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix permission error handling by checking file readability instead of
just existence, and provide clearer error messages with solutions.
Changes:
- Use -r flag instead of -f to check if .env is readable
- Add helpful error message with multiple solutions
- Guide users to either use sudo or create local .env file
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Update hook installation to use wildcard pattern instead of hardcoded
file names, ensuring all current and future hooks are copied.
Changes:
- Replace individual cp commands with cp hooks/*.sh pattern
- Automatically includes ntfy and uptime-kuma hooks
- More maintainable for future hook additions
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implement Uptime Kuma Push Monitor support with separate hook files
following separation of concerns principle.
Changes:
- Add UPTIME_KUMA_PUSH_URL to .env.example
- Create dedicated uptime-kuma-success.sh hook
- Create dedicated uptime-kuma-error.sh hook
- Update config.yaml to call both ntfy and Uptime Kuma hooks
- Each notification service has its own file for modularity
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace grep-based parsing with awk to properly capture header and data
lines without duplicates.
Changes:
- Use awk to capture header line (Original/Compressed/Deduplicated size)
- Print header followed by matching "All archives" line with sizes
- Exit immediately after first match to prevent duplicates
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Include the column headers (Original size, Compressed size, Deduplicated size)
in the disk-usage output for better readability.
Changes:
- Use grep -B1 to capture header line before "All archives"
- Display both header and data lines
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Move disk-usage functionality from Makefile to a dedicated shell script
for better maintainability and consistency with other scripts.
Changes:
- Create scripts/disk-usage.sh with all disk usage logic
- Simplify Makefile disk-usage target to call the script
- Add environment loading and color formatting to script
- Fix duplicate output by adding head -1 to grep chain
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Filter borgmatic info output to show the "All archives" line containing
GB sizes instead of the chunk statistics line.
Changes:
- Add grep filter for "GB" to capture size statistics
- Avoid displaying chunk counts which appeared in wrong section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix disk-usage command to display cumulative statistics for all archives
instead of just the last backup archive.
Changes:
- Target "All archives" section instead of "This archive"
- Show total deduplicated size across all backups
- Clarify label to indicate cumulative statistics
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Fix the disk-usage make target to properly parse SSH URLs containing ports
and display repository statistics correctly.
Changes:
- Simplify Borg statistics parsing to show actual values
- Fix SSH connection to handle custom ports (e.g., port 23)
- Extract user@host and port separately from BORG_REPO URL
- Use ssh -p PORT syntax instead of incorrect host:port format
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add new make disk-usage command to display repository statistics and remote
server disk space. This helps monitor storage usage and plan capacity.
Changes:
- Add disk-usage target to display Borg repository statistics
- Show original, compressed, and deduplicated sizes
- Display free disk space on remote backup server via SSH
- Update .PHONY declaration with new target
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace repository path with backup size in ntfy success notifications to
provide more useful information about backup completion.
Changes:
- Add backup size retrieval using borgmatic info command
- Display original size in notification instead of repository path
- Fallback to "taille inconnue" if size cannot be determined
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add exclusion patterns for Nextcloud and Gitea backup directories to avoid
backing up redundant data. Also normalize YAML indentation to 2 spaces for
consistency.
Changes:
- Exclude /opt/nextcloud/backups from backups
- Exclude /opt/gitea/backups from backups
- Add commented suggestions for preview and updater exclusions
- Normalize YAML indentation from 4 spaces to 2 spaces
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Replace deprecated argument-based parameter passing with environment variables
and dynamic data retrieval for archive names and error messages.
Changes:
- Remove "{archive_name}" and "{error}" placeholders from config.yaml
- Update ntfy-success.sh to retrieve archive name via borgmatic list
- Update ntfy-error.sh to extract error messages from systemd logs
- Add repository information to both notification types
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Added workflow to automatically deploy configuration changes when pushing to main branch. Includes comprehensive documentation for setting up SSH keys, configuring secrets, and troubleshooting deployments.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add 'set -a' and 'set +a' around 'source .env' in healthcheck.sh and restore.sh
- Ensures environment variables are exported to child processes (borg, borgmatic)
- Fixes issue where scripts would prompt for BORG_PASSPHRASE despite .env being loaded
- Update TODO.md: mark completed items, improve formatting
Scripts updated:
- scripts/healthcheck.sh: Export vars before calling borgmatic commands
- scripts/restore.sh: Export vars before calling borg commands
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- All make commands now automatically source /etc/borgmatic/.env before running
- Use 'set -a && source && set +a' pattern to export all variables
- Fixes "Cannot find variable BORG_REPO" errors when running make commands
- Applies to: test-config, dry-run, backup, list, info, check, prune, compact
- No need to manually load environment variables anymore
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change {BORG_REPO} to ${BORG_REPO} for correct Borgmatic interpolation
- The $ prefix is required for environment variable substitution
- Fixes "Invalid placeholder" error when running borgmatic
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Use correct 'before: action' and 'after: action' syntax instead of 'name' and 'when: [before_backup]'
- Simplify hook structure: before/after action for create, after error for failures
- Remove invalid schema fields that caused validation errors
- Commands now validate without errors
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Replace deprecated 'prefix' with 'match_archives: sh:backup-*'
- Replace deprecated hooks (before_actions, after_backup, on_error) with new 'commands' syntax
- Use structured command format with name, when, and run fields
- Removes all deprecation warnings from borgmatic config validate
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>