Commit Graph

108 Commits

Author SHA1 Message Date
Jonathan Miller e597896e73 feat: add PHP limit overrides and runtime extension checks
- BackupEngine: set_time_limit(0), memory_limit 512M, ignore_user_abort,
  flush output buffers, disable zlib compression
- RestoreEngine: same PHP limit overrides
- FtpUploader: check ext-ftp before upload attempt
- GoogleDriveUploader: check ext-curl before upload attempt
- BackupEngine: check ext-zip and ext-mbstring at startup
- Kickstart restore.php: check ext-pdo_mysql and ext-mbstring in preflight,
  show max_execution_time and memory_limit in check results

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 15:33:14 -05:00
Jonathan Miller dd572c6f9e chore: declare PHP extension dependencies in composer.json
Add required PHP extensions: ext-zip (archiving), ext-pdo + ext-pdo_mysql
(database), ext-curl (Google Drive), ext-ftp (FTP upload), ext-mbstring
(binary-safe string handling).

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 15:30:54 -05:00
Jonathan Miller 044722c7cf fix: use underscores in backup archive filenames
Example: mokoconsulting.tech_20260602_143000_profile1.zip

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 15:01:45 -05:00
Jonathan Miller 029f88fe4b fix: use hostname-timestamp-profile naming for backup archives
Archive filenames now follow: {hostname}-{YYYYMMDD-HHmmss}-profile{N}.zip
Example: mokoconsulting.tech-20260602-143000-profile1.zip

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 15:00:07 -05:00
Jonathan Miller 5502c19a5d feat: add restore engine and Kickstart self-extracting archives
- Add RestoreEngine: extract ZIP, restore files, import DB, preserve
  configuration.php, clean up staging directory
- Add FileRestorer: recursive file copy with protected file handling
  (skips configuration.php, .htaccess at root level)
- Add DatabaseImporter: streaming line-by-line SQL execution with
  comment/multiline handling and error tolerance
- Add Kickstart: standalone restore.php generator with web UI for
  restoring on blank servers (like Akeeba Kickstart Pro)
  - Pre-flight checks (PHP version, zip ext, writable)
  - Step-by-step: extract, import DB, update config, cleanup
  - Dark theme UI, CSRF protection, no dependencies
- Add "Include Restore Script" toggle per profile — wraps backup as
  outer.zip containing restore.php + site-backup.zip
- Add restore button to admin backups toolbar
- Fix innerHTML XSS risk (use DOM methods instead)

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 14:58:21 -05:00
Jonathan Miller 4a159bab39 feat: implement FTP and Google Drive remote uploaders
- Add RemoteUploaderInterface for pluggable storage backends
- Add FtpUploader: FTP/FTPS with passive mode, SSL, recursive dir
  creation, and post-upload size verification
- Add GoogleDriveUploader: OAuth2 refresh token auth, resumable upload
  API with 5 MB chunking for reliable large-file transfers
- Wire uploaders into BackupEngine Step 3: after ZIP creation, upload
  to configured remote, optionally delete local copy
- No SDK dependencies — pure PHP with cURL for Google Drive

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 14:03:46 -05:00
Jonathan Miller 201a281e3a feat: add scheduled tasks, individual fields, remote storage
- Add plg_task_mokobackup: Joomla Scheduled Tasks integration so each
  backup profile can run on its own schedule (like Akeeba Backup Pro)
- Replace JSON config/filters with individual form fields and DB columns
- Add FTP/FTPS and Google Drive remote storage options per profile
- Add archive settings tab (format, compression, split size, backup dir)
- Add exclusion filter fields (dirs, files, tables) as newline-separated
  textareas instead of raw JSON

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 13:58:50 -05:00
Jonathan Miller b82c1f8a24 feat: initial MokoJoomBackup package — Akeeba Backup Pro replacement
Full-site backup and restore for Joomla with three sub-extensions:
- com_mokobackup: Admin component with backup engine, profiles, and records
- plg_system_mokobackup: Auto-cleanup of expired backups
- plg_webservices_mokobackup: REST API wire-compatible with mcp_mokobackup

Backup engine supports full/database/files modes with step-based execution,
file/directory/table exclusion filters, and CLI script for cron use.

Authored-by: Moko Consulting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-02 13:47:36 -05:00