Commit Graph

24 Commits

Author SHA1 Message Date
BeauTroll
636f5987c7 Fix disk-usage to show size stats instead of chunk counts
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-18 16:02:37 +01:00
BeauTroll
1afde7afc3 Show all archives stats instead of last archive in disk-usage
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-18 16:00:46 +01:00
BeauTroll
9b10a325dc Fix disk-usage command to handle SSH URLs with ports correctly
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-18 15:48:27 +01:00
BeauTroll
cecc224dea Add disk-usage command to monitor backup server storage
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-18 15:43:12 +01:00
BeauTroll
6f968f73c4 Show backup size instead of repository in success notifications
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-18 15:38:24 +01:00
BeauTroll
9c03ebf8e2 Exclude backup directories and improve YAML formatting
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-17 20:40:07 +01:00
BeauTroll
b2beeb3334 Fix ntfy notification hooks to use Borgmatic 2.0 environment variables
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-17 06:42:14 +01:00
BeauTroll
25b0a2fcfa Add Gitea Actions for automatic deployment
Some checks failed
Deploy Borgmatic Configuration / Deploy to Production Server (push) Has been cancelled
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>
2025-12-16 09:13:58 +01:00
BeauTroll
e764d1dc3d Remove useless aliases 2025-12-16 09:12:40 +01:00
BeauTroll
6f3b3888a2 Fix healthcheck false positive in logs 2025-12-16 08:52:30 +01:00
BeauTroll
fa78f80d73 Export environment variables in scripts to fix passphrase prompts
- 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>
2025-12-16 08:15:17 +01:00
BeauTroll
24d3e7d914 Anonymize sensitive information and add SSH setup documentation
Documentation:
- Add comprehensive SSH key setup guide in docs/SSH-SETUP.md
- Add SSH configuration sections to README.md and QUICKSTART.md
- Replace specific provider examples with generic alternatives
- Remove Hetzner/BorgBase specific instructions for broader applicability

Anonymization:
- Remove company/project specific names (Agence66 → generic)
- Generalize service names (/srv/app → /srv/*)
- Remove detailed application lists (/opt/nextcloud, etc. → /opt/*)
- Replace specific usernames and hostnames with placeholders
- Change repository label from 'serveur' to 'production'

Files updated:
- README.md: Add SSH setup, anonymize content
- QUICKSTART.md: Add SSH configuration steps
- CHANGELOG.md: Generalize paths list
- config.yaml: Generic title and label
- install.sh: Remove branding
- scripts/healthcheck.sh: Remove branding
- docs/SSH-SETUP.md: New comprehensive SSH guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-16 06:31:56 +01:00
BeauTroll
615192ceda Auto-load .env in Makefile for all borgmatic commands
- 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>
2025-12-16 06:11:38 +01:00
BeauTroll
2b087414ba Fix environment variable interpolation syntax
- 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>
2025-12-16 06:07:18 +01:00
BeauTroll
9164e0273e Fix commands syntax for Borgmatic 2.0
- 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>
2025-12-16 06:04:00 +01:00
BeauTroll
df7dfe72a2 Migrate to Borgmatic 2.0 syntax without deprecations
- 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>
2025-12-16 05:57:14 +01:00
BeauTroll
b215d8c325 add config validation support 2025-12-16 05:54:49 +01:00
BeauTroll
66e4cd166f update for borgmatic 2.0 2025-12-16 05:50:03 +01:00
BeauTroll
92d9b530f3 fix config format 2025-12-16 05:32:48 +01:00
BeauTroll
4631a8208b add repositories from env 2025-12-16 05:29:38 +01:00
BeauTroll
709ad61557 fix deprecated config format 2025-12-16 05:28:09 +01:00
BeauTroll
fc8c413599 fix deprecated config validation 2025-12-16 05:17:57 +01:00
BeauTroll
58e101bd6d fix terminal colorng 2025-12-16 04:57:52 +01:00
BeauTroll
2b048a09e1 initial commit 2025-12-16 04:41:26 +01:00