Commit Graph
12 Commits
Author SHA1 Message Date
x3 8488778cf0 fix: run GUI as user, use sudo for root operations only
pkexec cannot open display (no DISPLAY env). GUI runs as normal user,
rsync/restore/mkdir/rm use sudo. First sudo prompts for password,
then token is cached for ~15min.
2026-09-08 09:27:19 +00:00
x3 e47ac11be1 fix: use execvp instead of system() for privilege escalation
system() blocked and prevented pkexec from re-launching the program.
execvp replaces the process, allowing pkexec to take over properly.
2026-09-08 09:23:14 +00:00
x3 4bff4f3db2 refactor: run as root via pkexec, remove sudo handling
- Add privilege escalation at startup (pkexec if not root)
- Remove all sudo password handling (echo password | sudo -S)
- Remove show_sudo_dialog and current_sudo_password_
- Remove --sudo-password CLI option
- All rsync/restore operations run directly as root
- format_size: use GB as default unit for large files
- Remove [cmd] log leaking sudo password
- Simplify snapshot_manager: no sudo_password parameter
- Simplify rsync_manager: no sudo_password parameter
2026-09-08 09:16:31 +00:00
x3 01b03f8424 fix: crash during backup - GTK assertions and segfault
- Fix gtk_box_pack on GtkMenuBar (was treated as GtkBox): build_toolbar() now returns widget instead of packing into toolbar_ member
- Fix markup error: </big></big> -> </big></b> in backup window header
- Fix segfault: validate tag name against TextBuffer tag table before use
- Add missing 'cmd' tag to live log buffer
- Add NULL sentinel to gtk_text_buffer_insert_with_tags_by_name calls
2026-09-08 08:59:46 +00:00
x3 c32b30d5ce docs: add missing Arch Linux build dependencies (autoconf, autoconf-archive, automake, libtool) 2026-09-08 08:42:16 +00:00
x3 240071166e fix: Backup-Snapshots werden jetzt mit sudo erstellt fuer korrekte Berechtigungen
Problem:
  Backups wurden ohne Root-Rechte erstellt. Dadurch wurden Datei-
  berechtigungen (UID/GID, rwx, ACLs, xattrs) nicht korrekt uebernommen.
  Root-Dateien konnten nicht gelesen werden. Backups waren unvollstaendig.

Loesung:
  - rsync_manager: create_snapshot() nutzt jetzt sudo fuer rsync
  - rsync_manager: --numeric-ids Flag hinzugefuegt fuer korrekte UID/GID
  - snapshot_manager: mkdir mit sudo fuer Root-Besitz der Snapshots
  - snapshot_manager: delete_snapshot mit sudo (Snapshots sind Root-owned)
  - main_window: Sudo-Passwort-Dialog vor jedem Backup
  - main_window: Dialog-Text erweitert (Backup erfordert sudo)
  - main.cpp: --sudo-password Argument fuer CLI/Cron-Modus
  - main.cpp: Interaktive Passwort-Eingabe im CLI-Modus
  - README.md: Build-Abhaengigkeiten fuer alle Distros hinzugefuegt
  - README.md: Rechte-Tabelle aktualisiert
  - README.md: Cronjob-Beispiel mit Passwort-Speicherung aktualisiert

Betroffene Dateien:
  src/rsync_manager.h, src/rsync_manager.cpp
  src/snapshot_manager.h, src/snapshot_manager.cpp
  src/main_window.h, src/main_window.cpp
  src/main.cpp
  README.md
2026-09-08 08:17:39 +00:00
x3 f95a634655 feat: add backup progress estimation with time remaining
- Add estimate_backup_size() using du -sb before rsync starts
- Parse transfer speed from rsync output (KB/s, MB/s, GB/s)
- Calculate remaining time based on speed and remaining bytes
- Show estimated time remaining and size progress in UI
- Add format_time_remaining() for human-readable time display
- New UI elements: backup_time_label_ and backup_size_label_
2026-09-07 19:29:29 +00:00
x3 33044731c8 fix: rsync progress callback overwritten by SnapshotManager
SnapshotManager::create_snapshot() set rsync_.on_progress = on_progress
where on_progress was nullptr, destroying the MainWindow callback.

Removed the line — MainWindow already sets rsync_.on_progress in ctor.
2026-09-07 17:50:38 +00:00
x3 7b50af6bbf fix: rsync real-time output + refresh button
- Use read() + poll() instead of fgets() to handle rsync \r progress
- rsync uses \r for in-place progress updates, fgets() blocked on \n
- Added poll() with 200ms timeout for non-blocking read
- Added refresh button (view-refresh icon) in snapshot sidebar header
- Fixed duplicate build_menu/build_toolbar calls
2026-09-07 17:45:05 +00:00
x3 5422ce17ba fix: backup progress window + real-time rsync output
- Replace small popup with big backup progress window (750x500)
- Shows rsync command in header, real-time output in monospace textview
- Progress bar with percentage, Cancel/Close button
- Output with color-coded tags (error=red, success=green, cmd=gray italic)
- Auto-scrolls to bottom during backup
- Fixed live log not updating (stdbuf -oL for unbuffered rsync output)
- Fixed double closing brace compilation error
- Downloaded proper backup icon
2026-09-07 17:37:59 +00:00
x3 e2b4bb1413 docs: add README with layout diagrams, architecture, and usage guide 2026-09-07 17:23:39 +00:00
x3 c8ef700612 feat: x3-backup v1.0.0 initial release
GTK3 backup/snapshot tool using rsync backend.

Features:
- rsync-based snapshots with hardlink delta for space efficiency
- Snapshot sidebar with date-sorted list
- Full file browser with permissions display (name, size, perms, mtime)
- Right-click context menu: Restore file/dir with sudo prompt
- System tray icon: backup status, context menu (show/backup/settings/quit)
- Menu system: File, Backup, System, Help
- Settings dialog: backup destination, source path, retention, exclusions
- Cronjob management: install/remove scheduled backups
- Live Log tab: real-time rsync output during backup
- History Log tab: full log file viewer with color-coded entries
- System Backup mode: full root filesystem backup
- System Restore mode: restore entire system from snapshot
- CLI mode: --backup, --system-backup for cron/headless use
- /mnt always excluded from backups
- Preserves permissions, ACLs, xattrs (-aAX flags)
- Log file: ~/.config/x3-backup/x3-backup.log
- Config: ~/.config/x3-backup/settings.json
- uninstall.sh for clean removal
2026-09-07 17:20:41 +00:00