Cover image for project: Nexus Backup Manager IN PROGRESS

Technical summary

Native NEXUS plugin that creates database, file or full-package backups and sends them to local or remote destinations through a connector architecture. It supports FTP, SFTP and cloud providers, protects credentials with AES-256-CBC, and integrates scheduling, retention, progress and restore into the panel workflow.

Executed scope

  • backend.php backend (911 lines): backup_mysql_dump() (mysqldump with single-transaction, routines and triggers), backup_files_zip() (uploads, plugins, scripts + extra paths) and backup_create_full() (dump + zip packaged as tar.gz, with temp cleanup).
  • Real-time progress via progress.json with polling (backup_progress) and a 10-minute lock (backup_is_running) that prevents concurrent runs.
  • Connector architecture: abstract BackupConnector class (getType/getName/getFields/test/upload + optional OAuth) and BackupConnectorManager with dynamic scan of the connectors/ folder and self-registration.
  • 8 implemented connectors: local, ftp (15s timeout, recursive folder creation), sftp (ssh2, SFTP subsystem), dropbox (OAuth2 code + refresh, automatic token renewal, upload at content.dropboxapi.com/2/files/upload), google-drive (offline OAuth2 with drive.file scope, multipart/related upload, folder browser and creation), mega (g.api.mega.co.nz API auth in simplified mode), mediafire (API 1.5 session token) and terabox (BDSTX session cookie).
  • Full in-panel OAuth: backup_oauth_callback (auth bypass in api.php), popup with postMessage({type:'nexus_oauth_success'}), copyable dynamic redirect URI, readonly fields for automatically obtained tokens.
  • Destinations: CRUD with per-type connection test (ATIVO/FALHA/NÃO TESTADO status with last_test/last_error), automatic ID generation (dest_ + hex) and AES-256-CBC encryption of credentials (pass, access_token, refresh_token, client_secret, cookie) before DB::setConfig('plugin.backup.destinations', ...).
  • Soft-cron scheduling: configuration in admin_configs (plugin.backup.schedule), backup job in cronjob.json (hourly/daily/weekly/monthly frequency, time, type, destination, 1–100 retention, notification), next_run calculation and backup_cron_check() triggered by the api.php cron loop (worker/cron/run_cron) — without touching the OS crontab.
  • Automatic retention (backup_apply_retention) by modification date (default 10 backups) with log entries.
  • One-click restore: .sql via mysql CLI, .zip via ZipArchive and .tar.gz via tar -xzf, with modal confirmation.
  • Sidecar metadata: each backup writes <file>.json with started_at, completed_at, type, destination and remote upload status (ENVIADO/FALHOU).
  • Alpine.js UI (tab.php 830 lines + assets/backup.js 555 lines): stats cards (total, database, files, full, size), searchable paginated table, progress bar, x-teleport modals with backdrop blur, per-connector dynamic fields, Google Drive folder explorer (with a note about the drive.file scope), embedded setup guides (MediaFire, Dropbox, Google) and a terminal-style log viewer (last 200 lines).
  • API: 16 actions registered via PluginManager::registerApiAction — backup_list, backup_create, backup_delete, backup_download, backup_restore, backup_destinations, backup_destination_save, backup_destination_delete, backup_destination_test, backup_schedule, backup_schedule_save, backup_log, backup_oauth_callback, backup_progress, backup_destination_folders, backup_destination_create_folder (session/Bearer authenticated with CSRF; only the OAuth callback has auth bypass).

Stack and tooling

  • PHP 8 (no framework)
  • MySQL 8 (settings in admin_configs; no dedicated tables)
  • Alpine.js + Tailwind CSS
  • cURL (cloud uploads and OAuth flows), OpenSSL (AES-256-CBC), ZipArchive, mysqldump/mysql/tar CLI
  • NEXUS plugin system (PluginManager)

Operational tags

  • Backup
  • Restore
  • Cloud Storage
  • Cronjobs

Operational outcome

  • Consolidated the NEXUS backup policy into a single plugin: MySQL dump, file compression and full tar.gz package, with optional delivery to multiple destinations.
  • Cloud provider credentials are never persisted in plain text (AES-256-CBC encryption with the panel key in admin_configs).
  • Scheduling integrated with the Cronjobs hub (backup job), removing the dependency on manual OS crontab.
  • Step-by-step provider setup guides (Dropbox, Google Drive, Mega, MediaFire, Terabox) embedded in the interface and in the plugin documentation.

GitHub progress (issues)

Real-time panel with latest repository issues.

abertas (amostra): -- fechadas (amostra): -- base: -- ultimas issues

carregando andamento...

Real results

Native NEXUS plugin for multi-destination backups (database, files and full) with delivery to local, FTP/SFTP and cloud providers (Dropbox, Google Drive, Mega, MediaFire, Terabox), encrypted credentials and soft-cron scheduling.

Architecture and organization

Execution and operations

The project follows reproducible execution flow with technical validation in production-like environments.

Screenshots

Talk about this project

Apply this implementation pattern in your environment and accelerate delivery with technical consistency.