Destinations (formerly “Remote Storage”)
Remote and local targets are now unified as Destinations. A profile can push each finished archive to one or more destinations, managed per profile in the profile's Destinations panel. Each destination is stored as one row (with its settings as JSON) in #__mokonyxbackup_remotes. A local destination type stores the archive in a folder on this server - it is now just another destination alongside the remote ones (see below).
| Backend | Features |
|---|---|
| SFTP | SSH-key, encrypted-key (passphrase), or password auth (paste or upload a key file), configurable port and remote path |
| FTP/FTPS | Passive mode, SSL, recursive dir creation, size verification |
| Google Drive | Service-account (JWT-bearer) auth, placeholder-able subfolder path, resumable chunked upload, Shared Drive support, no SDK |
| Amazon S3 | AWS Signature V4, multipart upload, placeholder-able path prefix, custom endpoints |
| Backblaze B2 | S3-compatible API (application key auth), multipart upload, placeholder-able path prefix |
| Dropbox | App key/secret + refresh-token OAuth, chunked upload, placeholder-able path |
| Local | A folder on this server - this IS the local copy of the archive (see below) |
All uploaders are pure PHP with cURL - no SDK dependencies. Each backend ships as a storage-provider plugin (plg_mokonyxbackupstorage_*, plugin group mokonyxbackupstorage) - local, sftp, s3, ftp, googledrive, backblaze and dropbox - so new destination types can be added by dropping in a plugin. A destination type appears in the Add/Edit modal's Type selector once its storage plugin is enabled.
SFTP Authentication
An SFTP destination supports three auth types: an unencrypted SSH key, an encrypted SSH key (with a passphrase), and a password. Password and encrypted-key auth are performed via the server's sshpass utility - the secret is passed to the SSH process through an environment variable, never on the command line. If sshpass isn't installed on the server, those two modes report a clear, actionable error; switch the destination to an unencrypted key or install sshpass.
Google Drive (Service Account)
Google Drive destinations authenticate with a Google service account - there is no OAuth consent screen, no “authorize” round-trip, and no refresh token to expire. A Google Drive destination has three fields:
- Service Account Key (JSON) (
gdrive_service_account_json) - paste the full service-account JSON key from the Google Cloud Console (or upload the.jsonfile). MokonyxBackup reads theclient_emailandprivate_keyfrom it and signs an RS256 JWT, which it exchanges for an access token via thejwt-bearergrant (urn:ietf:params:oauth:grant-type:jwt-bearer) athttps://oauth2.googleapis.com/token. - Drive Folder ID (
gdrive_folder_id) - the Drive folder backups are uploaded to. Open the folder in Google Drive and paste its whole URL here (for examplehttps://drive.google.com/drive/folders/1AbC...) - the folder ID is extracted automatically, both in the browser and server-side. A bare ID still works, and an empty value uploads to the Drive root. - Subfolder Path (
gdrive_path) - optional, placeholder-aware (for example[HOST]/[YEAR]). Each/segment of the resolved path is found or created by name under the configured Drive folder (or your Drive root), and the deepest folder parents the uploaded file.
Important: a service account has no Drive storage of its own. The target folder must be shared with the service account's client_email (as an Editor), or be a Shared Drive (Team Drive) the service account is a member of. Shared Drives are fully supported (supportsAllDrives=true&includeItemsFromAllDrives=true). Enable the Drive API in the Google Cloud Console; the uploader requires the PHP cURL and OpenSSL extensions. Uploads stream in 5 MB chunks from a temp file (so peak memory doesn't scale with chunk size) and each chunk is retried with exponential backoff on a transient failure (transport error, 429, or 5xx). The Subfolder Path field carries the same clickable Insert: placeholder legend as the local backup-directory field.
Backblaze B2
A Backblaze B2 destination talks to B2's S3-compatible API and takes a Key ID, Application Key, Bucket, Region, and an optional placeholder-able Path prefix. The Application Key is stored as a masked secret. Uploads use the same AWS Signature V4 multipart uploader as S3.
Dropbox
A Dropbox destination uses app-based OAuth and takes an App Key, App Secret, Refresh Token, and an optional placeholder-able Path. The App Secret and Refresh Token are stored as masked secrets; the refresh token is exchanged for short-lived access tokens automatically, so there is no interactive sign-in at backup time.
S3-Compatible Services
- AWS S3:
https://s3.amazonaws.com - Wasabi:
https://s3.wasabisys.com - Backblaze B2:
https://s3.us-west-001.backblazeb2.com - MinIO: your server URL
The S3 Path Prefix is run through the placeholder resolver ([HOST], [SITE_NAME], date tokens, and so on) for both upload and retention delete, so a value like [HOST]/backups produces a real object-key prefix rather than a folder literally named [HOST]. Multipart uploads use parts of at least 5 MB. The S3 path field shows the same clickable Insert: placeholder legend as the local backup-directory field.
Per-Destination Restore Script
Each destination chooses how - and whether - a restore script travels with the archive it receives, via a Restore script dropdown with three modes:
- None - the archive is delivered as-is, with no restore script.
- Inside the archive - the destination receives a copy of the archive with
restore.phpwrapped in. The already-compressed archive is stored (not re-compressed), so wrapping is fast. - Outside as a sidecar - a standalone
restore.phpis placed beside the archive at the destination, as a separate file.
Because the mode is chosen per destination, you can (for example) push a plain archive to cheap bulk storage while keeping a self-restoring copy on an SFTP box.
The Local Copy Is a Local Destination
The old Keep local copy profile option has been removed. Instead, a local destination IS the local copy. If the profile has an enabled local destination, the archive is kept on this server; if it has none, the local archive is deleted after the remote uploads finish (and, as a safeguard, whenever any upload fails). To keep a copy on the server, add a Local destination pointing at the folder you want the archive to live in. A per-destination Keep Local Copy toggle lets you keep the single working archive when any enabled destination requests it. Local-destination paths resolve [HOME]/[HOST] and the other placeholders (no more literal [HOME]/[HOST] folders), and a local destination that points at the archive's own folder is handled gracefully rather than erroring. Out of the box the default backup directory now sits above the web root, so it is never web-accessible.
Per-Destination Results
Each backup record shows a per-destination result for every destination the profile targeted - a Delivered or Failed status alongside the destination's type and path. If one remote fails while others succeed, you see exactly which one failed and where each copy landed, rather than a single all-or-nothing status for the whole backup.
Remote Retention Pruning
RetentionManager is the single retention authority and prunes remote copies as well as the local one. When a record is pruned by age or count it deletes the DB row, unlinks the local archive and its log, and deletes the archive from every currently enabled remote destination for that profile. Remote deletion is idempotent and best-effort - a failure is logged but never blocks local pruning. The shared standalone restore.php is intentionally never pruned from remotes.