Enhance backup and restoration with SQL format for improved data integrity

Migrates backup/restore from JSON to SQL using pg_dump/psql, updating the admin UI and scheduler.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e80fed01-7137-4997-b9af-dad57132d430
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/e80fed01-7137-4997-b9af-dad57132d430/e5OOjbh
This commit is contained in:
michaelschal committed 2025-07-19 12:25:38 +00:00
1 parent 3891ae828b
commit b2ee16b1c3
5 files changed
+662 -197

No files matched your search

+10
View File
@@ -315,6 +315,16 @@ Preferred communication style: Simple, everyday language.
- ✅ **Database Schema**: Sales and sale_products tables properly configured for multi-product sales
- ✅ **Export Compatibility**: All export functions (Excel, PDF, CSV) support multiple products per sale
### SQL Backup System Implementation (January 19, 2025)
- ✅ **SQL Backup Format**: Migrated from JSON to native PostgreSQL SQL format using pg_dump
- ✅ **Database Restoration**: Implemented SQL import capability using psql for complete database restoration
- ✅ **Automatic SQL Backups**: Modified scheduler to create SQL dumps instead of JSON exports
- ✅ **Manual Export/Import**: Updated administration interface to handle SQL files (.sql)
- ✅ **Buffer Optimization**: Increased maxBuffer to 50MB for handling large databases with photo data
- ✅ **Production Compatibility**: Native PostgreSQL backup format ensures full compatibility with production systems
- ✅ **Data Integrity**: SQL format preserves all database structure, constraints, and relationships
- ✅ **User Interface**: Updated backup management UI with SQL-specific messaging and file extensions
### Docker Configuration & Cleanup (January 9, 2025)
- ✅ Complete Docker setup optimized for external PostgreSQL database
- ✅ Docker Compose configuration with RegisFlow application only