Commit Graph

4 Commits

Author SHA1 Message Date
shuki
c1d00108ba Add MySQL grants backup and MySQL restore support
- mysql_dump_grants(): backs up user grants via SHOW CREATE USER + SHOW GRANTS,
  skipping system users (root, mysql.sys, etc.)
- mysql_restore_databases(): restores .sql.gz dumps and grants.sql from snapshot
- Backup flow: grants dumped alongside database dumps into _mysql/
- Restore flow: automatically restores MySQL databases and grants when _mysql/
  exists in snapshot and target has MySQL enabled
- CLI: --skip-mysql flag to opt out of MySQL restore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 04:53:41 +02:00
shuki
791584aa60 Fix MySQL dump remote path to use _mysql/ instead of full temp path
Add optional dest_name parameter to transfer_folder to override the
remote subpath. MySQL dumps now land in _mysql/ inside the snapshot
instead of tmp/gniza-mysql-xxx/_mysql/.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 02:56:37 +02:00
shuki
733bb5de62 Add MySQL database backup support
Dump MySQL/MariaDB databases as part of backup snapshots. Each database
is dumped to a separate gzipped file under _mysql/ in the snapshot.
Supports all-databases mode with exclude list, or explicit database
selection. Includes TUI form fields for full configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 02:48:47 +02:00
shuki
928d5af54c Initial implementation of gniza4linux backup tool
Complete Linux backup manager with Whiptail TUI and CLI interface.
Adapted from gniza4cp (cPanel backup tool) with target/profile-based
system replacing cPanel-specific features.

- 14 core engine modules (backup, restore, targets, remotes, transfer, etc.)
- 11 Whiptail TUI screens (full CRUD for targets/remotes/schedules)
- CLI entrypoint with subcommands for scripting/cron
- Support for SSH, local, S3, and Google Drive remotes
- rsync --link-dest incremental snapshots
- Root and user mode (XDG paths)
- 70 passing tests
- Config templates, installer, uninstaller

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 21:15:29 +02:00