- Add per-user activity logging to AdminBin: every RESTORE_* action
writes to /var/log/gniza/cpanel-<user>.log with action details and
gniza command output
- New logs.live.cgi CGI with paginated activity list and detail view
- WHM logs.cgi now shows cpanel-*.log files with Owner column and
structured activity entry viewer with expandable command output
- Add Logs nav item to cPanel plugin, update install.sh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The WHM setup wizard handles all configuration (SSH, S3, GDrive),
making the interactive CLI init wizard redundant.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Only show per-run gniza-*.log files in the logs page. Cron wrapper
logs (cron-*.log) are redundant with the structured per-run logs
and just accumulate noise. They remain accessible via direct URL.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add [TYPE:SYSBACKUP] marker to sysbackup log output. The logs page
detects this in the first 5 lines and displays "System" badge instead
of "Backup".
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each of the 6 stat cards now has a contextual SVG icon in the top-right
corner: users, shield-check, upload, server, clock, and file-text.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Desktop (lg+) shows horizontal menu links. Smaller screens show
a dropdown hamburger button with the same navigation items.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DaisyUI stat components have internal styles that conflict when used
as standalone grid items, causing vertical overlap. Switch to plain
card components with manual typography classes instead.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove stat-figure emoji icons that caused content overflow and
switch from fixed grid-cols-3 to responsive grid-cols-2 sm:grid-cols-3.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
Enhance the remotes table with AJAX-loaded disk usage info (SSH via df,
S3/GDrive via rclone about) and server-side schedule assignment counts
with tooltip showing schedule names.
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>
Uncheck and disable the toggle when switching to Selective so
the value cannot carry through to the confirmation step.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use hidden class toggle instead of inline style.display, since
Tailwind CSS is built with the important flag.
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>
Scans each log file for [ERROR] and [WARN] markers and displays
a color-coded badge in the logs table.
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>
Always defaults to merge (overwrite) strategy. The terminate & re-create
option is removed from the UI to simplify the restore workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fall back to default '30' when RETENTION_COUNT is set to empty string,
not just when the key is missing from the config.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Widen label to w-52 with whitespace-nowrap to prevent the info icon
from wrapping to a new line. Change tooltip position from right to top.
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>
Adds a "Sys Backup" column with an AJAX toggle in the schedules
table. Toggling it updates SYSBACKUP in the schedule config and
reinstalls the cron entry to include/remove --sysbackup.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Runs a schedule's backup immediately with the correct --remote and
--sysbackup flags from the schedule config. Also fixes WHM Run Now
button to include --sysbackup when enabled.
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>
Previously the cron was only updated if it was already active.
Now every save reinstalls the cron entry so changes (like enabling
--sysbackup) take effect immediately.
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>
The sysbackup toggle is now available for both add and edit flows,
so users can trigger a system backup against any existing remote.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>