447f7b572e
Universal: PR Check / Require Docs Update (pull_request) Has been skipped
Universal: PR Check / Wiki Update Reminder (pull_request) Has been skipped
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Universal: PR Check / Secret Scan (pull_request) Successful in 10s
Universal: PR Check / Validate PR (pull_request) Failing after 14s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 40s
Generic: Project CI / Lint & Validate (pull_request) Successful in 52s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 1m8s
Generic: Project CI / Tests (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Retention (RetentionManager and the plugin's hourly cleanup) only ever deleted local files; remote archives grew unbounded. Add an idempotent delete() to RemoteUploaderInterface + all four uploaders and have RetentionManager remove each pruned archive from the profile's enabled remotes (best-effort; failures logged). The shared restore.php is left in place since every backup overwrites it. (#229) Consolidate duplicated plumbing (#230): - New RemoteUploaderFactory replaces the createUploaderFromParams copy duplicated in BackupEngine and SteppedBackupEngine. - RetentionManager becomes the single retention authority (global-default fallback + pruneOrphans()); the system plugin delegates to it and its duplicate doCleanup()/deleteBackupRecord() logic is removed. - Backend controller, API controller and legacy cli/mokosuitebackup.php now run through the shared BackupRunner instead of BackupEngine directly. Refs #229 #230 Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
49 lines
1.5 KiB
PHP
49 lines
1.5 KiB
PHP
<?php
|
|
|
|
/**
|
|
* @package MokoSuiteBackup
|
|
* @subpackage com_mokosuitebackup
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
*/
|
|
|
|
namespace Joomla\Component\MokoSuiteBackup\Administrator\Engine;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
interface RemoteUploaderInterface
|
|
{
|
|
/**
|
|
* Upload a file to remote storage.
|
|
*
|
|
* @param string $localPath Absolute path to the local file
|
|
* @param string $remoteName Filename to use on the remote end
|
|
*
|
|
* @return array{success: bool, message: string, remote_path?: string}
|
|
*/
|
|
public function upload(string $localPath, string $remoteName): array;
|
|
|
|
/**
|
|
* Delete a previously-uploaded file from remote storage.
|
|
*
|
|
* Used by retention pruning so that expiring a local backup also removes
|
|
* its archive from every remote destination. Implementations should treat
|
|
* an already-absent remote file as success (idempotent delete), so a
|
|
* partially-cleaned destination never blocks pruning.
|
|
*
|
|
* @param string $remoteName Filename on the remote end (the same
|
|
* $remoteName that was passed to upload())
|
|
*
|
|
* @return array{success: bool, message: string}
|
|
*/
|
|
public function delete(string $remoteName): array;
|
|
|
|
/**
|
|
* Test the connection / credentials without uploading.
|
|
*
|
|
* @return array{success: bool, message: string}
|
|
*/
|
|
public function testConnection(): array;
|
|
}
|