# Bak&Rest Bak&Rest monitora cartelle configurate su Windows, registra i file creati, modificati, cancellati o spostati e prepara il backup successivo tramite tray app. ## Componenti - `BakRestWatchdog`: servizio Windows di monitoraggio. - `BakRestTray`: tray app che eseguira' il backup e lo spegnimento. - `BakRestConfig`: GUI di configurazione. ## Configurazione Alla prima esecuzione viene creato un file TOML modificabile in: ```text %PROGRAMDATA%\BakRest\config.toml ``` Per creare o trovare il file di configurazione: ```powershell python -m bakrest.config_cli init python -m bakrest.config_cli path ``` In sviluppo si puo' usare un percorso diverso: ```powershell $env:BAKREST_CONFIG="C:\devel\bak&rest\config\config.toml" python -m bakrest.watchdog_runner ``` ## Avvio watchdog in console per test ```powershell python -m pip install -e . python -m bakrest.watchdog_runner ``` ## Installazione servizio Windows Da PowerShell avviato come amministratore: ```powershell python -m pip install -e . python -m bakrest.service install python -m bakrest.service start ``` Se `service.autostart = true`, il comando `install` configura il servizio con avvio automatico. Se e' `false`, il servizio viene installato con avvio manuale. Il valore puo' essere sempre sovrascritto passando esplicitamente le opzioni di `pywin32`. Comandi utili: ```powershell python -m bakrest.service stop python -m bakrest.service remove python -m bakrest.service debug ``` Il servizio si chiama `BakRestWatchdog`.