initial
This commit is contained in:
114
README.md
Normal file
114
README.md
Normal file
@@ -0,0 +1,114 @@
|
||||
Hier is je **extreme short, sharp, architectural** versie — volledig gecomprimeerd, professioneel, helder.
|
||||
Bron verwerkt uit je bestand
|
||||
|
||||
---
|
||||
|
||||
# Disk Reorganizer — Architectural Summary
|
||||
|
||||
## Core Outcome
|
||||
|
||||
Migration from **SQLite → PostgreSQL** completed.
|
||||
System is now **network-capable**, **auditable**, **scalable**, and offers **real-time operational telemetry**.
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
### Database Layer (PostgreSQL)
|
||||
|
||||
* Central DB: `disk_reorganizer_db`
|
||||
* User: `disk_reorg_user`
|
||||
* Tables: `files`, `operations`
|
||||
* Features: indexes, triggers, conflict-upserts, audit fields
|
||||
* Deployment: SQL + Windows/Linux setup scripts
|
||||
|
||||
### Application Layer
|
||||
|
||||
* Python driver migrated to **psycopg2**
|
||||
* Unified DB config + connection pooling
|
||||
* Refactored CRUD + batch commits
|
||||
* Robust error handling + transactional execution
|
||||
|
||||
### Operational Layer
|
||||
|
||||
* **Dynamic in-screen logging** during indexing + migration
|
||||
|
||||
* File/sec, GB processed, ETA, success/error counters
|
||||
* Clean single-line, non-spamming UI updates
|
||||
|
||||
---
|
||||
|
||||
## Workflow
|
||||
|
||||
1. **Setup**
|
||||
|
||||
```json
|
||||
{
|
||||
"host": "192.168.1.159",
|
||||
"port": 5432,
|
||||
"database": "disk_reorganizer_db",
|
||||
"user": "disk_reorg_user",
|
||||
"password": "heel-goed-wachtwoord"
|
||||
}
|
||||
```
|
||||
```bash
|
||||
./setup_database.sh # or setup_database.bat
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
2. **Index**
|
||||
|
||||
```bash
|
||||
python app/main.py index "D:\\" disk_d
|
||||
```
|
||||
|
||||
3. **Plan**
|
||||
|
||||
```bash
|
||||
python app/main.py plan disk_d disk_e
|
||||
```
|
||||
|
||||
4. **Dry-Run**
|
||||
|
||||
```bash
|
||||
python app/main.py execute plan.json --dry-run
|
||||
```
|
||||
|
||||
5. **Execute**
|
||||
|
||||
```bash
|
||||
python app/main.py execute plan.json
|
||||
```
|
||||
|
||||
6. **Report**
|
||||
|
||||
```bash
|
||||
python src/main.py report
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Guarantees
|
||||
|
||||
* No destructive actions by default
|
||||
* Originals preserved
|
||||
* Every action logged in DB
|
||||
* Error-resilient, continues safely
|
||||
* Suitable for millions of file records
|
||||
|
||||
---
|
||||
|
||||
## Failure Points to Check
|
||||
|
||||
* PostgreSQL reachable on 5432
|
||||
* Correct credentials
|
||||
* Disk permissions
|
||||
* Python + psycopg2 installed
|
||||
|
||||
---
|
||||
|
||||
## Essence
|
||||
|
||||
A lean, safe, high-visibility disk migration tool running on a proper relational backbone, engineered for clarity, scale, and operational certainty.
|
||||
|
||||
Wil je ook een **ultrakorte executive one-pager** of een **diagram-versie**?
|
||||
Reference in New Issue
Block a user