JSKIP_TO_CONTENT
  • Help
  • Glossary
  • Tickets
  • EcoSystem Status
Moko Consulting
  • Home
  • News
  • Services
  • Products
  • Jobs
You are here:
  1. Home
  2. Support
  3. Mokonyx
  4. MokonyxBackup
  5. Reference

Reference

MokonyxBackup CLI Commands

Details
Category: Reference
  • Applicable Software: MokonyxBackup
  • Min Version Number: 01.00.01
  • Max Version Number: Not Applicable

Prefer the terminal? MokonyxBackup ships a full set of Joomla console commands to run backups, list records and profiles, restore, clean up old archives, and manage content snapshots — all driven by the same engine as the web UI and ready to drop into cron.

Overview

MokonyxBackup provides CLI commands via the Joomla console plugin (plg_console_mokonyxbackup). All commands run through Joomla's console entry point from the site root:

php cli/joomla.php <command> [options]

All commands run through the shared BackupRunner service, producing the same complete / warning / fail outcome as the web UI. A legacy standalone script (administrator/components/com_mokonyxbackup/cli/mokonyxbackup.php) is also bundled for existing cron setups.

CLI backups are one of the automated origins that are not gated by the execution-tuning wizard: even while that wizard is still pending on a site, mokonyxbackup:run keeps running on the conservative defaults, so scheduled and unattended CLI jobs are never blocked.

Commands

mokonyxbackup:run

Run an immediate backup.

php cli/joomla.php mokonyxbackup:run --profile=1 --description="Nightly backup"
OptionShortDefaultDescription
--profile-p1Backup profile ID
--description-dCLI backupBackup description

Exit code is 0 on success, 1 on failure. The origin is recorded as cli.

mokonyxbackup:profiles

List all backup profiles (use this to find a profile ID).

php cli/joomla.php mokonyxbackup:profiles

Output columns: ID, Title, Type, Published.

mokonyxbackup:list

List backup records, newest first.

php cli/joomla.php mokonyxbackup:list --status=complete --limit=10
OptionShortDefaultDescription
--limit-l20Max records to show
--status-s(all)Filter: complete, fail, running

Output columns: ID, Profile, Status, Type, Size, Origin, Started.

mokonyxbackup:restore

Restore a completed backup by record ID. This overwrites the current site, so it prompts for confirmation.

php cli/joomla.php mokonyxbackup:restore 42
OptionDescription
--files-onlyRestore files only (skip the database)
--db-onlyRestore the database only (skip files)
--no-preserve-configRestore the archived configuration.php instead of keeping the current one
--password / -pDecryption password for encrypted archives

The record must be marked complete and the archive must still exist on disk.

mokonyxbackup:cleanup

Prune old backup records and archive files by age and/or count.

php cli/joomla.php mokonyxbackup:cleanup --max-age=14 --max-count=5
php cli/joomla.php mokonyxbackup:cleanup --dry-run
OptionDefaultDescription
--max-age30Delete backups older than N days
--max-count10Keep only the N newest backups
--dry-runfalseShow what would be deleted without deleting

mokonyxbackup:snapshot

Create, restore, list, or delete content snapshots (articles, categories, modules) — a lightweight alternative to a full backup for content-only rollbacks.

php cli/joomla.php mokonyxbackup:snapshot create --types=articles,categories,modules --description="Before edit"
php cli/joomla.php mokonyxbackup:snapshot list
php cli/joomla.php mokonyxbackup:snapshot restore --id=5 --mode=replace
php cli/joomla.php mokonyxbackup:snapshot delete --id=5

Cron Integration

# Daily full backup at 2 AM
0 2 * * * cd /var/www/html && /usr/bin/php cli/joomla.php mokonyxbackup:run -p 1

# Weekly cleanup on Sundays
0 3 * * 0 cd /var/www/html && /usr/bin/php cli/joomla.php mokonyxbackup:cleanup --max-age=30 --max-count=10
Last Updated: September 02, 2026
Hits: 14

MokonyxBackup REST API & MCP Integration

Details
Category: Reference
  • Applicable Software: MokonyxBackup
  • Min Version Number: 01.00.01
  • Max Version Number: Not Applicable

Drive MokonyxBackup remotely over a token-authenticated REST API that's wire-compatible with the mcp_mokonyxbackup MCP server. Start backups, list and download records, manage profiles and backup destinations, and create or inject content snapshots — from your own tooling or straight from an AI assistant.

REST API Endpoints

Routes are registered by plg_webservices_mokonyxbackup and are wire-compatible with the mcp_mokonyxbackup MCP server. The API Application and the Web Services plugin must be enabled. All routes require authentication — send a Joomla API token in the X-Joomla-Token header (or a Bearer token):

X-Joomla-Token: <your-api-token>
Accept: application/json

Base URL: /api/index.php/v1/mokonyxbackup/.... Each action also enforces a component ACL permission; a failed check returns HTTP 403.

Backup Endpoints

MethodEndpointDescription
POST/mokonyxbackup/backupStart a backup (body: profile + description, both optional)
GET/mokonyxbackup/backupsList backup records
GET/mokonyxbackup/backups/:idGet a single record
DELETE/mokonyxbackup/backup/:idDelete a backup record + archive
GET/mokonyxbackup/backup/:id/downloadDownload the archive (binary stream)
GET/mokonyxbackup/profilesList backup profiles (credentials masked)

Backup records also expose remote_results (the per-destination delivery outcome), base_record_id (the differential-backup base link), and checksum (archive integrity).

Destination Endpoints

Manage a profile's Destinations — the local and remote backup targets stored in #__mokonyxbackup_remotes (previously admin-only, now fully scriptable). Transport secrets (FTP/SFTP/S3/Google Drive passwords, keys, tokens) are masked on output and merge-preserved on update (echoing back the ******** mask can't blank them). All destination routes require the core.manage permission.

MethodEndpointDescription
GET/mokonyxbackup/destinations?profile=:idList a profile's destinations
GET/mokonyxbackup/destination/:idGet a single destination
POST/mokonyxbackup/destinationCreate a destination
PATCH/mokonyxbackup/destination/:idUpdate a destination
DELETE/mokonyxbackup/destination/:idDelete a destination
POST/mokonyxbackup/destination/:id/toggleEnable / disable a destination
POST/mokonyxbackup/destination/:id/restore-scriptDeploy the standalone restore.php through this destination

Snapshot Endpoints

Content snapshots capture selected content types (articles, categories, modules) as portable JSON. All require the mokonyxbackup.snapshot.manage permission.

MethodEndpointDescription
GET/mokonyxbackup/snapshotsList snapshots (paginated)
POST/mokonyxbackup/snapshotCreate a snapshot
POST/mokonyxbackup/snapshot/:id/restoreRestore from a snapshot
POST/mokonyxbackup/snapshot/injectInject a payload directly (master → slave)
DELETE/mokonyxbackup/snapshot/:idDelete a snapshot + its data file
GET/mokonyxbackup/snapshot/:id/downloadDownload the snapshot JSON

MCP Server

The mcp_mokonyxbackup MCP server is wire-compatible with these endpoints, so an AI assistant can start backups, list records, manage profiles and destinations, and create or inject content snapshots remotely.

CLI

php cli/joomla.php mokonyxbackup:run --profile=1
php cli/joomla.php mokonyxbackup:run --profile=2 --description="Pre-deploy"
Last Updated: September 02, 2026
Hits: 15

Support

  • Help
  • Glossary
  • Tickets
  • EcoSystem Status

🛎️ Prefer white‑glove setup?

Moko Consulting can provision the line, port your number, tune policies, and hand you a zero‑drama system with a one‑page runbook.
Find out More Here or Contact us to find out more!
📝 Open Support Ticket ☎️ Call ‪(931) 279-6313
Mokonyx 38 mokogit 34 Onboarding 16 mcp 11 CMS 9 Marketing 5 Branding 5 SEO 4
  • Terms of Service
  • Privacy Policy
  • Privacy Information Request
Copyright © 2026 Moko Consulting. All Rights Reserved.
Powered by MokoOnyx