Commit Graph

7 Commits

Author SHA1 Message Date
Jonathan Miller 11141f27f4 feat: per-profile backup retention (days and count)
Generic: Repo Health / Access control (push) Successful in 1s
Generic: Repo Health / Site Health (push) Has been skipped
Universal: Auto Version Bump / Version Bump (push) Successful in 3s
Generic: Project CI / Lint & Validate (push) Successful in 8s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 6s
Generic: Project CI / Tests (push) Has been cancelled
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Each profile can now set its own retention_days and retention_count.
A value of 0 means use the global default from component options.

Cleanup logic refactored to iterate per-profile with individual
retention thresholds. Also cleans up orphaned records where the
parent profile was deleted. Log files alongside archives are now
removed during cleanup.

Extracted deleteBackupRecord() helper for consistent file+DB cleanup.
2026-06-17 02:55:55 -05:00
Jonathan Miller 5f04332fc5 feat: ntfy push notification support per backup profile
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 1s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 6s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 10s
Universal: Auto Version Bump / Version Bump (push) Successful in 15s
Generic: Repo Health / Access control (pull_request) Successful in 2s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Secret Scanning / Gitleaks Secret Scan (pull_request) Successful in 10s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 14s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report Issues (pull_request) Has been cancelled
Add ntfy (https://ntfy.sh) push notifications alongside email.
Each backup profile can configure its own ntfy topic, server, and
access token independently.

- New profile fields: ntfy_topic, ntfy_server (default ntfy.sh),
  ntfy_token (optional, for private topics)
- NotificationSender sends both email and ntfy in parallel
- Uses priority 5 (urgent) for failures, 3 (default) for success
- Includes backup status emoji, profile name, type, archive, size
- 10-second timeout to prevent blocking backup completion
- SQL migration 01.18.00 adds columns to profiles table
2026-06-15 04:32:57 -05:00
Jonathan Miller 2a9443601e fix: [DEFAULT_DIR] resolves to JPATH_ROOT/backups, shown as placeholder
- getDefaultAbsolute() now returns JPATH_ROOT/backups instead of
  the old admin component directory
- SQL default, form default, and install migration all use [DEFAULT_DIR]
- portablize() converts ./backups and old literal paths back to [DEFAULT_DIR]
- Users see [DEFAULT_DIR] in the field, resolved path shown in status
2026-06-11 15:27:17 -05:00
Jonathan Miller 5c697b9eeb fix: pretty names for all sub-extensions, default backup dir to ./backups
- Component: MokoSuiteBackup
- Plugins: System/Task/Console/Content/QuickIcon/ActionLog/WebServices - MokoSuiteBackup
- Default backup_dir changed to ./backups (relative to site root)
- Auto-migrate old defaults on upgrade
2026-06-11 12:48:11 -05:00
Jonathan Miller 49f3d9fdcf feat: change default backup dir to ../backups (outside web root)
- Default backup_dir is now ../backups (relative to JPATH_ROOT),
  which resolves outside public_html on most hosting setups
- Added BackupDirectory::normalizePath() to resolve ../ segments
  without requiring the path to exist on disk
- Added BackupDirectory::portablize() to auto-detect absolute paths
  and replace them with portable placeholders ([HOME], ../backups)
- ProfileTable::check() auto-normalizes backup_dir on save
- Install postflight auto-migrates old in-webroot defaults to ../backups
- Dashboard warning now checks resolved path instead of string matching
- .htaccess protection only applied when directory is inside web root
2026-06-11 12:39:59 -05:00
Jonathan Miller e8b40d9389 fix: resolve relative paths in folder browser, add placeholders help modal
- browseDir() now resolves paths via BackupDirectory::resolve() before
  permission check, fixing "access denied" when browsing from [DEFAULT_DIR]
- SQL default for backup_dir changed to [DEFAULT_DIR] placeholder
- Added help button (?) next to Browse that opens a modal listing all
  available placeholders with examples and recommended paths
2026-06-11 12:30:23 -05:00
Jonathan Miller ace33b60fe feat: rename mokojoombackup → mokosuitebackup, add [HOME] placeholder for backup directory
Generic: Repo Health / Site Health (push) Has been skipped
Generic: Repo Health / Access control (push) Successful in 2s
Universal: Auto Version Bump / Version Bump (push) Successful in 10s
Generic: Repo Health / Scripts governance (push) Has been cancelled
Generic: Repo Health / Repository health (push) Has been cancelled
Generic: Repo Health / Report Issues (push) Has been cancelled
Renames all sub-extensions from mokojoombackup to mokosuitebackup
(package, component, 7 plugins, language files, manifests).

Adds [HOME] placeholder to BackupDirectory and PlaceholderResolver
so users can set backup_dir to [HOME]/backups (outside web root).
Fixes folder browser "access denied" on PHP-FPM shared hosting
where getenv('HOME') returns empty by adding POSIX and JPATH_ROOT
fallback detection.
2026-06-11 12:24:27 -05:00