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.phpbackend (911 lines):backup_mysql_dump()(mysqldump with single-transaction, routines and triggers),backup_files_zip()(uploads, plugins, scripts + extra paths) andbackup_create_full()(dump + zip packaged as tar.gz, with temp cleanup).- Real-time progress via
progress.jsonwith polling (backup_progress) and a 10-minute lock (backup_is_running) that prevents concurrent runs. - Connector architecture: abstract
BackupConnectorclass (getType/getName/getFields/test/upload + optional OAuth) andBackupConnectorManagerwith dynamic scan of theconnectors/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 atcontent.dropboxapi.com/2/files/upload),google-drive(offline OAuth2 withdrive.filescope, multipart/related upload, folder browser and creation),mega(g.api.mega.co.nz API auth in simplified mode),mediafire(API 1.5 session token) andterabox(BDSTX session cookie). - Full in-panel OAuth:
backup_oauth_callback(auth bypass inapi.php), popup withpostMessage({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) beforeDB::setConfig('plugin.backup.destinations', ...). - Soft-cron scheduling: configuration in
admin_configs(plugin.backup.schedule),backupjob incronjob.json(hourly/daily/weekly/monthly frequency, time, type, destination, 1–100 retention, notification),next_runcalculation andbackup_cron_check()triggered by theapi.phpcron 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:
.sqlviamysqlCLI,.zipvia ZipArchive and.tar.gzviatar -xzf, with modal confirmation. - Sidecar metadata: each backup writes
<file>.jsonwithstarted_at,completed_at, type, destination and remote upload status (ENVIADO/FALHOU). - Alpine.js UI (
tab.php830 lines +assets/backup.js555 lines): stats cards (total, database, files, full, size), searchable paginated table, progress bar,x-teleportmodals with backdrop blur, per-connector dynamic fields, Google Drive folder explorer (with a note about thedrive.filescope), 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/tarCLI - 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 (
backupjob), 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.
live feed
open issues on GitHubcarregando andamento...
não foi possivel carregar as issues agora. abra no github pelo link acima.
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
- PHP 8
- MySQL 8
- Alpine.js
- Tailwind CSS
- cURL
- OpenSSL
- Plugin NEXUS
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.