Files
bckWinRsync/client/README.md
2026-01-23 11:12:31 +01:00

2.1 KiB

Backup Client (PySide6)

Portable Windows client UI that drives the Proxmox FastAPI orchestrator via HTTPS.

Features

  • Profile management (name + folder list) stored next to the executable in config.json.
  • Folders list, Task Scheduler toggle, SSH credentials (username/password) for the pull backup.
  • Progress bar, status label and log stream fed by the orchestrator's /backup/status and /backup/log endpoints.
  • Login prompt when the stored API token expires or is missing.

Getting started

  1. Install dependencies (pip install -e . inside the client folder or build a PyInstaller bundle).
  2. Launch the client: python -m backup_client.ui (PyPI-style module entry uses the main() function).
  3. Use the UI to create/save profiles, add folders, enter the Windows host/SSH info, and click Esegui backup.
  4. Config (server URL, profiles, scheduler flag, token) is persisted in config.json sitting beside the executable for portability.

Scheduling and packaging notes

  • The Task Scheduler switch is persisted but wiring to schtasks should be done via scripts.
  • rsync.exe, OpenSSH, and wrapper scripts live on the Windows client; this UI only triggers the server pull.
  • See scheduler/manage_scheduler.ps1 for a helper that takes -Action Enable|Disable, -TaskName, -ExecutablePath, and optional profile metadata to build the schtasks /Create call. The checkbox now invokes that script, so enabling the scheduler creates the ONLOGON task that calls BackupClient.exe --auto --profile "<name>" and disabling the switch removes it.
  • After PyInstaller finishes, run post_build.bat path\to\dist\<bundle> to copy config.json and the scheduler helper into the same directory as BackupClient.exe so the runtime can find them (post_build.bat copies config.json to the root and the scheduler folder beside the exe).
  • Run package_client.sh from Bash/WSL or package_client.bat from cmd/PowerShell: both invoke PyInstaller with the required --add-data flags, target dist/BackupClient, and call post_build.bat so config.json and the scheduler helper travel with the exe.