2.1 KiB
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/statusand/backup/logendpoints. - Login prompt when the stored API token expires or is missing.
Getting started
- Install dependencies (
pip install -e .inside theclientfolder or build a PyInstaller bundle). - Launch the client:
python -m backup_client.ui(PyPI-style module entry uses themain()function). - Use the UI to create/save profiles, add folders, enter the Windows host/SSH info, and click Esegui backup.
- Config (server URL, profiles, scheduler flag, token) is persisted in
config.jsonsitting beside the executable for portability.
Scheduling and packaging notes
- The Task Scheduler switch is persisted but wiring to
schtasksshould 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.ps1for a helper that takes-Action Enable|Disable,-TaskName,-ExecutablePath, and optional profile metadata to build theschtasks /Createcall. The checkbox now invokes that script, so enabling the scheduler creates theONLOGONtask that callsBackupClient.exe --auto --profile "<name>"and disabling the switch removes it. - After PyInstaller finishes, run
post_build.bat path\to\dist\<bundle>to copyconfig.jsonand the scheduler helper into the same directory asBackupClient.exeso the runtime can find them (post_build.batcopiesconfig.jsonto the root and theschedulerfolder beside the exe). - Run
package_client.shfrom Bash/WSL orpackage_client.batfrom cmd/PowerShell: both invoke PyInstaller with the required--add-dataflags, targetdist/BackupClient, and callpost_build.batsoconfig.jsonand the scheduler helper travel with the exe.