feat: complete requirements gaps - backup/restore, uat signoff, pm attachments, templates, and filters

This commit is contained in:
Atharv1705
2026-11-13 18:15:32 +05:30
parent cd9eb27a98
commit d9ca4bbb02
38 changed files with 1403 additions and 69 deletions
+45 -1
View File
@@ -71,7 +71,51 @@ docker compose up --build
## Documentation & Walkthroughs
- [10-Minute Demo Script](docs/DEMO_SCRIPT.md)
- [Acceptance Checklist (Proposal §10)](docs/ACCEPTANCE_CHECKLIST.md)
- [Acceptance Checklist & UAT Sign-off Matrix](docs/ACCEPTANCE_CHECKLIST.md)
- [Role-Based User Guide](docs/USER_GUIDE.md)
- [Assumptions, Retention & Governance Policies](docs/ASSUMPTIONS.md)
## Database Backup & Disaster Recovery
The application includes an automated, online backup utility in `backend/scripts/backup.py` that utilizes SQLite's safe online backup API (`sqlite3.Connection.backup`) to capture a transactionally consistent snapshot of the database alongside all uploaded attachment files without requiring downtime.
### Running a Manual Backup
```bash
cd backend
# Windows:
.venv\Scripts\python.exe scripts/backup.py backup
# macOS/Linux:
python scripts/backup.py backup
```
- Creates a timestamped archive: `backend/data/backups/ams_backup_YYYYMMDD_HHMMSS.zip` containing `ams.db` and the `uploads/` folder.
- Runs `PRAGMA integrity_check` automatically before bundling.
- Retains the latest 7 backups by default (`--keep N` flag configurable).
### Verifying Backup Integrity
```bash
cd backend
python scripts/backup.py verify data/backups/ams_backup_20261113_174700.zip
```
### Restoring from a Backup
```bash
cd backend
python scripts/backup.py restore data/backups/ams_backup_YYYYMMDD_HHMMSS.zip
```
- Validates SQLite integrity before restoring.
- Automatically saves a `.safety_pre_restore_<timestamp>.bak` of the active database before overwriting.
- Unpacks attachments directly into `backend/data/uploads/`.
### Automated Nightly Backups
To schedule automatic nightly backups at 01:00 AM:
- **Linux / Docker (cron):**
```cron
0 1 * * * cd /path/to/poona-ams/backend && /path/to/poona-ams/backend/.venv/bin/python scripts/backup.py backup >> /var/log/ams_backup.log 2>&1
```
- **Windows (Task Scheduler / PowerShell):**
```powershell
schtasks /create /tn "PoonaAMS_NightlyBackup" /tr "powershell -ExecutionPolicy Bypass -Command 'cd C:\path\to\poona-ams\backend; .\.venv\Scripts\python.exe scripts\backup.py backup'" /sc daily /st 01:00
```
## Demo Accounts
| Email | Password | Role |