Skip to content

file-bricks/ProSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

ProSync

Intelligente Backup-Synchronisation mit Datenbankschutz.

Features

  • Ordner-Synchronisation (einseitig / beidseitig)
  • Datei-Synchronisation für einzelne Dateien
  • Automatische Datenbank-Erkennung und Schutz
  • WAL Checkpoint für SQLite-Dateien vor dem Kopieren
  • System Tray Integration für Hintergrundbetrieb
  • Geplante Backups mit konfigurierbaren Intervallen
  • Batch-Sync für mehrere ausgewählte Verbindungen in einem Lauf
  • Datenbank-Indexierung für Suche und Versionierung (optional)
  • ProFiler-Companion -- optionaler Start von ProFiler aus dem Hauptfenster

Screenshots

Hauptfenster

Installation

pip install -r requirements.txt

Erforderliche Pakete

  • PySide6
  • (Optional) PyPDF2 für PDF-Vorschau im Reader
  • (Optional) python-docx für Word-Vorschau im Reader

Verwendung

Via Python

python ProSyncStart_V3.1.py

Via Batch-Datei

START.bat

Die Anwendung startet im System Tray. Rechtsklick auf das Icon für Optionen.

Windows-Build

Für einen reproduzierbaren lokalen Windows-Build steht build_exe.bat bereit. Das Skript erzeugt dist/ProSync/ProSync.exe und kopiert ProSyncReader.exe in denselben Ausgabeordner, damit die Suchoberfläche auch im Frozen-Modus weiterhin separat gestartet werden kann. Build-Artefakte in build/, dist/ und releases/ werden bewusst nicht versioniert.

Qualitätssicherung

python -m compileall -q ProSyncStart_V3.1.py ProSyncReader.py prosync_utils.py logger.py run_tests.py test_batch_sync_queue.py test_config_manager.py test_database_safety.py test_import_streams.py test_sync_worker.py
python run_tests.py

GitHub Actions führt dieselben Smoke-Tests für Python 3.10, 3.11 und 3.12 aus.

Datenschutz und lokale Dateien

ProSync_config.json, Logs, Build-Artefakte und lokale Host-Notizen bleiben außerhalb des Repositories. Die getrackte Datei ProSync_config.example.json enthält nur eine leere Beispielstruktur und keine persönlichen Quell- oder Zielpfade.

Für GitHub werden nur Quellcode, Tests, Beispielkonfiguration und Projektdokumentation versioniert. Persönliche Sync-Ziele, Datenbanken, WAL-Dateien, temporäre Locks und lokale Build-Ausgaben sind über .gitignore ausgeschlossen.

Sicherheitslücken bitte nicht als öffentliches Issue melden, sondern über GitHubs private Vulnerability-Reporting-Funktion im Tab Security.

Batch-Ausführung

Wähle mehrere Aufgaben mit Ctrl oder Shift in der Liste aus und starte sie gesammelt mit ▶ Batch starten oder per Kontextmenü. ProSync arbeitet die Auswahl nacheinander ab, doppelte IDs werden ignoriert und der Batch wird bei Fehlern oder manuellem Stop kontrolliert beendet.

Synchronisationsmodi

Modus Beschreibung Anwendungsfall
mirror Ziel = exakte Kopie der Quelle Vollständiges Backup
update Nur neuere Dateien übertragen Inkrementelles Backup
two_way Bidirektionale Synchronisation Sync zwischen zwei Rechnern
one_way Quelle → Ziel, keine Löschungen Sichere Archivierung
index_only Nur Indexierung, kein Kopieren Dateiverwaltung ohne Sync

Beispielszenarien

1. Projektordner-Backup

Aufgabe: Tägliches Backup eines Entwicklungsprojekts

Konfiguration:

  • Quelle: C:\Projekte\MeinProjekt
  • Ziel: D:\Backups\MeinProjekt
  • Modus: mirror
  • Geplant: Täglich um 18:00 Uhr
  • Indexierung: Aktiviert (für Suche)

Ergebnis: Vollständiges Backup mit Dateiversionierung und Suchfunktion

2. Synchronisation zwischen Laptop und Desktop

Aufgabe: Dateien zwischen zwei PCs synchronisieren

Konfiguration:

  • Quelle: C:\Dokumente
  • Ziel: \\Desktop-PC\Dokumente
  • Modus: two_way
  • Geplant: Alle 30 Minuten
  • Konfliktlösung: newest (neueste Datei gewinnt)

Ergebnis: Bidirektionaler Sync, beide PCs haben immer die aktuellen Dateien

3. Datenbank-Backup (SQLite mit WAL-Modus)

Aufgabe: Sicheres Backup einer SQLite-Datenbank

Konfiguration:

  • Typ: Datei-Verbindung (nicht Ordner!)
  • Quelle: C:\App\data.db
  • Ziel: D:\Backups\data.db
  • Modus: one_way
  • WAL Checkpoint: Aktiviert
  • Geplant: Alle 4 Stunden

Ergebnis: Konsistente DB-Backups ohne Korruption

Datenbankschutz (V3.2)

ProSync erkennt kritische Datenbanken automatisch und wendet sichere Einstellungen an:

Unterstützte Datenbanktypen

  • SQLite (.sqlite, .sqlite3, .db, .db3)
  • MS Access (.mdb, .accdb)

Automatische Sicherheitsmaßnahmen

Für Ordner-Verbindungen:

  • Kritische DBs (im WAL-Modus) werden automatisch ausgeschlossen
  • WAL-Dateien (.db-wal, .db-shm, .db-journal) werden nie kopiert
  • Empfehlung: Datei-Verbindungen für einzelne DBs erstellen

Für Datei-Verbindungen:

  • WAL Checkpoint wird automatisch aktiviert
  • Einweg-Modus wird empfohlen
  • Checkpoint vor jeder Kopieroperation

Was ist ein WAL Checkpoint?

WAL (Write-Ahead Logging) speichert SQLite-Änderungen in einer separaten -wal-Datei. Ein Checkpoint führt diese Änderungen in die Haupt-DB-Datei zurück.

Ohne Checkpoint: Inkonsistente Backups möglich. Mit Checkpoint: Konsistente DB-Kopie intendiert (abhängig von SQLite-Checkpoint-Implementierung, keine Gewähr).

Konfigurationsdatei

ProSync_config.json - Wird lokal automatisch erstellt und verwaltet. Die Datei ist ignoriert, weil sie persönliche Quell-/Zielpfade enthalten kann. Ein sicheres Beispiel liegt in ProSync_config.example.json.

Beispiel (Ordner-Verbindung):

{
  "connections": [
    {
      "id": "conn-abc123",
      "name": "Projekt Backup",
      "type": "folder",
      "source": "C:\\Projekte\\MeinProjekt",
      "target": "D:\\Backups\\MeinProjekt",
      "mode": "mirror",
      "conflict_policy": "source",
      "indexing": true,
      "db_path": "C:\\Projekte\\MeinProjekt\\profiler_index.db",
      "exclude_patterns": ["*.tmp", "*.lock", "__pycache__"],
      "autosync": {
        "enabled": true,
        "interval_minutes": 60
      }
    }
  ]
}

Beispiel (Datei-Verbindung):

{
  "connections": [
    {
      "id": "conn-def456",
      "name": "Datenbank Backup",
      "type": "file",
      "source_file": "C:\\App\\data.db",
      "target_file": "D:\\Backups\\data.db",
      "mode": "one_way",
      "checkpoint_before_sync": true,
      "autosync": {
        "enabled": true,
        "interval_minutes": 240
      }
    }
  ]
}

ProSyncReader

Ein separates Tool zur Suche in den Sync-Datenbanken.

python ProSyncReader.py

Features:

  • Volltextsuche in synchronisierten Dateien
  • Tag-basierte Suche
  • Datei-Vorschau (PDF, DOCX)
  • Direktes Öffnen von Dateien/Ordnern

ProFiler-Companion

ProSync kann ProFiler direkt aus dem Hauptfenster starten. Die Suche prüft zuerst app.profiler_path in ProSync_config.json, danach lokale Standardpfade und zuletzt den gemeinsamen Software-Baum REL-PUB_ProFiler. Konfigurierte Pfade dürfen absolut, relativ zum ProSync-Ordner oder über Umgebungsvariablen wie %USERPROFILE%\\... angegeben werden.

Tipps & Best Practices

Empfohlen:

  • Datei-Verbindungen für einzelne Datenbanken verwenden
  • WAL Checkpoint für SQLite-DBs aktivieren
  • Neue Verbindungen zuerst mit einem manuellen Sync testen
  • exclude_patterns für temporäre Dateien verwenden

Vermeiden:

  • two_way für kritische Datenbanken verwenden
  • Laufende Anwendungen synchronisieren
  • .db-wal-Dateien manuell kopieren
  • mirror verwenden, wenn keine Löschungen gewünscht sind

Fehlerbehebung

"Checkpoint failed"

Datenbank ist gerade geöffnet/gesperrt. Anwendung schließen oder Timeout erhöhen.

"Sync hängt"

Große Dateien oder langsame Netzwerkverbindung. update statt mirror für schnellere Syncs verwenden.

"Datei wurde ausgeschlossen"

exclude_patterns in der Konfiguration prüfen. Kritische DBs werden automatisch ausgeschlossen (bei Ordner-Verbindungen).

System Tray Befehle

  • Linksklick: Hauptfenster öffnen
  • Rechtsklick → Ausführen: Verbindung manuell starten
  • Rechtsklick → Auto-Ausführung: Geplanten Sync aktivieren
  • Rechtsklick → Beenden: ProSync beenden

Lizenz

MIT - Siehe LICENSE

Dieses Projekt verwendet PySide6 (LGPL).


Version: 3.2 Autor: Lukas Geiger Zuletzt aktualisiert: Mai 2026


English

ProSync

Intelligent backup synchronization with database safety.

Features

  • Folder Synchronization (one-way / two-way)
  • File Synchronization for individual files
  • Automatic Database Detection and protection
  • WAL Checkpoint for SQLite files before copying
  • System Tray Integration for background operation
  • Scheduled Backups with configurable intervals
  • Batch Sync for multiple selected connections in one run
  • Database Indexing for search and versioning (optional)
  • ProFiler Companion -- optional start of ProFiler from the main window

Screenshots

Main Window

Installation

pip install -r requirements.txt

Required Packages

  • PySide6
  • (Optional) PyPDF2 for PDF preview in Reader
  • (Optional) python-docx for Word preview in Reader

Usage

Via Python

python ProSyncStart_V3.1.py

Via Batch File

START.bat

The application starts in the system tray. Right-click the icon for options.

Windows Build

build_exe.bat provides a reproducible local Windows build. It creates dist/ProSync/ProSync.exe and copies ProSyncReader.exe into the same output folder so the search UI can still be launched separately in frozen mode. Build artifacts in build/, dist/, and releases/ are intentionally not versioned.

Quality Checks

python -m compileall -q ProSyncStart_V3.1.py ProSyncReader.py prosync_utils.py logger.py run_tests.py test_batch_sync_queue.py test_config_manager.py test_database_safety.py test_import_streams.py test_sync_worker.py
python run_tests.py

GitHub Actions runs the same smoke tests on Python 3.10, 3.11, and 3.12.

Privacy and Local Files

ProSync_config.json, logs, build artifacts, and local host notes stay outside the repository. The tracked ProSync_config.example.json contains only an empty example structure and no personal source or target paths.

The GitHub repository only tracks source code, tests, sample configuration, and project documentation. Personal sync targets, databases, WAL files, temporary locks, and local build outputs are excluded through .gitignore.

Please report security vulnerabilities through GitHub's private vulnerability reporting flow in the Security tab instead of opening a public issue.

Batch Execution

Select multiple tasks with Ctrl or Shift in the list and launch them together via ▶ Batch starten or the context menu. ProSync runs the selection sequentially, ignores duplicate IDs, and stops the batch cleanly on errors or manual cancellation.

Synchronization Modes

Mode Description Use Case
mirror Target = exact copy of source Full backup
update Transfer only newer files Incremental backup
two_way Bidirectional synchronization Sync between two workstations
one_way Source → target only, no deletions Safe archiving
index_only Indexing only, no copying File management without sync

Example Scenarios

1. Project Folder Backup

Task: Daily backup of a development project

Configuration:

  • Source: C:\Projekte\MeinProjekt
  • Target: D:\Backups\MeinProjekt
  • Mode: mirror
  • Scheduled: Daily at 6:00 PM
  • Indexing: Enabled (for search)

Result: Complete backup with file versioning and search functionality

2. Synchronization Between Laptop and Desktop

Task: Synchronize files between two PCs

Configuration:

  • Source: C:\Dokumente
  • Target: \\Desktop-PC\Dokumente
  • Mode: two_way
  • Scheduled: Every 30 minutes
  • Conflict Resolution: newest (newest file wins)

Result: Bidirectional sync, both PCs always have the latest files

3. Database Backup (SQLite with WAL Mode)

Task: Safe backup of a SQLite database

Configuration:

  • Type: File connection (not folder!)
  • Source: C:\App\data.db
  • Target: D:\Backups\data.db
  • Mode: one_way
  • WAL Checkpoint: Enabled
  • Scheduled: Every 4 hours

Result: Consistent DB backups without corruption

Database Protection (V3.2)

ProSync automatically detects critical databases and applies safe settings:

Supported Database Types

  • SQLite (.sqlite, .sqlite3, .db, .db3)
  • MS Access (.mdb, .accdb)

Automatic Safety Measures

For Folder Connections:
  • Critical DBs (in WAL mode) are automatically excluded
  • WAL files (.db-wal, .db-shm, .db-journal) are never copied
  • Recommendation: Create file connections for individual DBs
For File Connections:
  • WAL Checkpoint is automatically enabled
  • One-way mode is recommended
  • Checkpoint before each copy operation

What is WAL Checkpoint?

WAL (Write-Ahead Logging) stores SQLite changes in a separate -wal file. A checkpoint merges these changes back into the main DB file.

Without checkpoint: Inconsistent backups possible! With checkpoint: Intended to create a consistent DB copy, depending on SQLite checkpoint behavior.

Configuration File

ProSync_config.json - Automatically created and managed locally. The file is ignored because it can contain personal source/target paths. A safe example is tracked as ProSync_config.example.json.

Example (Folder Connection):

{
  "connections": [
    {
      "id": "conn-abc123",
      "name": "Projekt Backup",
      "type": "folder",
      "source": "C:\\Projekte\\MeinProjekt",
      "target": "D:\\Backups\\MeinProjekt",
      "mode": "mirror",
      "conflict_policy": "source",
      "indexing": true,
      "db_path": "C:\\Projekte\\MeinProjekt\\profiler_index.db",
      "exclude_patterns": ["*.tmp", "*.lock", "__pycache__"],
      "autosync": {
        "enabled": true,
        "interval_minutes": 60
      }
    }
  ]
}

Example (File Connection):

{
  "connections": [
    {
      "id": "conn-def456",
      "name": "Datenbank Backup",
      "type": "file",
      "source_file": "C:\\App\\data.db",
      "target_file": "D:\\Backups\\data.db",
      "mode": "one_way",
      "checkpoint_before_sync": true,
      "autosync": {
        "enabled": true,
        "interval_minutes": 240
      }
    }
  ]
}

ProSyncReader

A separate tool for searching the sync databases.

python ProSyncReader.py

Features:

  • Full-text search in synchronized files
  • Tag-based search
  • File preview (PDF, DOCX)
  • Direct opening of files/folders

ProFiler Companion

ProSync can launch ProFiler directly from the main window. The search checks app.profiler_path in ProSync_config.json first, then local default paths, and finally the shared REL-PUB_ProFiler software tree. Configured paths may be absolute, relative to the ProSync folder, or use environment variables such as %USERPROFILE%\\....

Tips & Best Practices

Recommended:

  • Use file connections for individual databases
  • Enable WAL Checkpoint for SQLite DBs
  • Test new connections with a manual sync first
  • Use exclude_patterns for temporary files

Avoid:

  • Use two_way for critical databases
  • Synchronize running applications
  • Copy .db-wal files manually
  • Use mirror if you don't want deletions

Troubleshooting

"Checkpoint failed"

Database is currently open/locked. Close the application or increase the timeout.

"Sync hangs"

Large files or slow network connection. Use update instead of mirror for faster syncs.

"File was excluded"

Check exclude_patterns in the config. Critical DBs are automatically excluded (for folder connections).

System Tray Commands

  • Left-click: Open main window
  • Right-click → Run: Start connection manually
  • Right-click → Auto-run: Enable scheduled sync
  • Right-click → Exit: Quit ProSync

License

MIT - See LICENSE

This project uses PySide6 (LGPL).


Haftung / Liability

Dieses Projekt ist eine unentgeltliche Open-Source-Schenkung im Sinne der §§ 516 ff. BGB. Die Haftung des Urhebers ist gemäß § 521 BGB auf Vorsatz und grobe Fahrlässigkeit beschränkt. Ergänzend gelten die Haftungsausschlüsse aus der MIT-Lizenz.

Nutzung auf eigenes Risiko. Keine Wartungszusage, keine Verfügbarkeitsgarantie, keine Gewähr für Fehlerfreiheit oder Eignung für einen bestimmten Zweck.

This project is an unpaid open-source donation. Liability is limited to intent and gross negligence (§ 521 German Civil Code). Use at your own risk. No warranty, no maintenance guarantee, no fitness-for-purpose assumed.

About

Intelligent backup synchronization with database safety and scheduled syncs

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors