Files
MokoSuiteBackup/source/packages/com_mokosuitebackup/sql/updates/mysql/01.25.00.sql
T
Jonathan Miller ef31713029
Universal: Auto Version Bump / Version Bump (push) Successful in 10s
feat: content snapshots, restore UI, and config hardening (v01.25.00)
Add content snapshot system for lightweight article/category/module
versioning independent of full backups. Snapshots store as JSON files
with replace or merge restore modes, wrapped in DB transactions.

- SnapshotEngine: dumps articles, categories, modules + related tables
  (workflow_associations, tag maps, frontpage) to JSON
- SnapshotRestoreEngine: replace (clean slate) or merge (upsert) mode
- Full MVC: controller, models, view, template with create/restore modals
- New ACL permission: mokosuitebackup.snapshot.manage
- Submenu entry with camera icon, upgrade SQL for snapshots table

Improve full-site restore UI with confirmation modal offering options
for files, database, preserve config, and encryption password.

Config improvements:
- WebcronSecretField: CSPRNG generator, strength meter, rejects weak
  patterns (password, admin, secret), enforces min 16 chars
- IpWhitelistField: table-based management, current IP detection with
  one-click "Add my IP" button
- Default profile shows "Title (#ID)" format
- Default backup dir uses [DEFAULT_DIR] placeholder
- Install script generates random 32-char webcron secret
- Dashboard quick actions: full-width dropdown with button below
2026-06-21 15:25:53 -05:00

17 lines
1.0 KiB
SQL

CREATE TABLE IF NOT EXISTS `#__mokosuitebackup_snapshots` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`description` VARCHAR(255) NOT NULL DEFAULT '',
`content_types` VARCHAR(255) NOT NULL DEFAULT '[]' COMMENT 'JSON array: ["articles","categories","modules"]',
`status` VARCHAR(20) NOT NULL DEFAULT 'complete' COMMENT 'complete, fail',
`articles_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`categories_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`modules_count` INT(11) UNSIGNED NOT NULL DEFAULT 0,
`data_file` VARCHAR(512) NOT NULL DEFAULT '' COMMENT 'Absolute path to JSON snapshot file',
`data_size` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Size of JSON file in bytes',
`log` MEDIUMTEXT DEFAULT NULL COMMENT 'Snapshot operation log',
`created` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
`created_by` INT(11) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `idx_created` (`created`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;