Add 6 stat cards to the WHM dashboard showing cPanel accounts, backed up
accounts, total snapshots, remotes, schedules, and last backup status.
Remote-dependent stats are collected via `gniza stats` CLI command and
cached in stats.json, with a manual Refresh button on the dashboard.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace tabs-box with navbar component: logo+text in navbar-start,
menu links in navbar-end. Remove all inline styles, use only
Tailwind/DaisyUI classes.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace old logo SVG with gniza.svg and render the icon alongside
"GNIZA Backup" text where "Backup" uses the icon's orange (#f47216).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Place the SVG icon next to the tab bar in a flex row instead of
rendering it as a separate centered block above the navigation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WHM restore page now populates the account dropdown dynamically
from the selected remote, making terminated/removed accounts visible
and restorable. Accounts not on the local server show "(terminated)".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Old versions stored CSRF/flash as plain files at the directory path.
New code expects directories. _ensure_dir now removes conflicting
plain files left by older versions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add fallback write when O_EXCL _safe_write fails for CSRF tokens
(ensures token is always persisted to disk)
- Update SMTP test JS to sync new CSRF token into main form hidden field
(prevents stale token after SMTP test consumes the original)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add "Terminate First" toggle to restore page (UI, Runner, CLI, lib)
- When enabled, removes existing cPanel account before restoring
- Add GNIZA Backup SVG logo to WHM plugin header (inline base64)
- Copy uninstall.sh to /usr/local/gniza/ during installation
- Update CLAUDE.md with new restore params and Runner options
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Restores now always merge into existing accounts (--force). The
terminate-and-recreate option is removed from CLI, restore library,
Runner allowlist, and WHM UI.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add --exclude flag to restore account/files commands to skip specific
paths during homedir restoration (rsync --exclude / rclone --exclude)
- Add exclude paths UI in WHM restore form (step 2 tag input + modal,
step 3 summary, step 4 command building)
- Add rclone_from_remote_filtered() for passing extra args to rclone copy
- Add _build_exclude_args() helper in restore.sh
- Add exclude pattern to Runner.pm allowlist
- Add skip-suspended flag and schedule configuration enhancements
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds SKIP_SUSPENDED config key and --skip-suspended CLI flag that
excludes suspended accounts (detected via /var/cpanel/suspended/)
from backups. Follows the same pattern as the existing SYSBACKUP
toggle across all layers: config, schedule loader, cron builder,
CLI flag parsing, and WHM UI (table toggle, AJAX handler, form card).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Runner.pm: extract _validate()/_build_cmd_line(), add run_async() that
forks a detached child via setsid() to run commands in background
- restore.cgi: handle_step4() builds commands array and uses run_async()
instead of blocking synchronous execution, redirects to logs.cgi
- logs.cgi: add auto-refresh JS (10s list view, 5s file view with
auto-scroll) that polls index.cgi?action=status while gniza is running
- index.cgi: add live status card with AJAX polling and JSON endpoint
- Cron/schedule: redirect cron output to /dev/null (gniza has own logs)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses DaisyUI collapse component so the SSH guidance is hidden
by default and expandable on click.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Cron.pm's install_schedule() had its own cron line builder that
didn't include --sysbackup. Now it checks SYSBACKUP=yes in the
schedule config and appends --sysbackup to the cron command.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add lib/sysbackup.sh and lib/sysrestore.sh for system-level
backup and restore of WHM/cPanel config, packages, and cron jobs
- Wire cmd_sysbackup and cmd_sysrestore into bin/gniza
- Add --sysbackup flag to cmd_backup: runs system backup after all
account backups complete
- Add SYSBACKUP schedule config key so cron jobs can include
--sysbackup automatically via build_cron_line()
- Add "Include system backup" toggle to WHM schedule form
- Revert sysbackup toggle from remotes.cgi (belongs in schedules)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clicking any column header sorts the table rows. Supports text and
numeric sorting with ascending/descending toggle and arrow indicators.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Custom DaisyUI theme using the provided color palette:
- Primary: dark blue rgb(5,61,142)
- Secondary/Error: orange rgb(238,118,45)
- Accent/Warning: yellow rgb(254,204,0)
- Info: teal rgb(90,168,189)
- Neutral: darker blue rgb(2,44,105)
- Base: white/gray
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace raw cron entries with descriptions like "Every hour, to rasp"
or "Daily at 02:00, all remotes". Add cron_to_human() to Cron.pm.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Send email via curl SMTP when SMTP_HOST is configured, falling back
to system mail/sendmail when empty. NOTIFY_EMAIL now accepts
comma-separated addresses. WHM Settings page gets an SMTP card
with Send Test Email button.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When adding a remote via WHM, create the base directory structure
on the remote server (matching gniza init remote CLI behavior).
Creates $REMOTE_BASE/<hostname>/accounts/ via SSH mkdir or rclone mkdir.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read-only log viewer with file list (sorted by mtime), per-file viewer
with level-based coloring (ERROR/WARN/INFO/DEBUG), level filter buttons,
cron log truncation (last 500 lines default), and path traversal protection.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Full-featured cPanel backup tool with SSH, S3, and Google Drive support.
Includes WHM plugin with Tailwind/DaisyUI UI, multi-remote management,
decoupled schedules, and account restore workflows.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>