SQLite -> PostgreSQL Migration
SQLite -> PostgreSQL Migration
SQLite is deprecated. Version > 1.5.3 requires PostgreSQL.
Strategy
- No SQLite data import. We rebuild by re-parsing logs.
- The legacy SQLite file will be removed after migration.
Detection rule
Migration notice appears when:
var/nginxpulse_data/nginxpulse.dbexists, andvar/nginxpulse_data/pg_migration_donedoes not exist.
Once migration is done, pg_migration_done is created and the notice will not show again.
Trigger flow
When user confirms:
- Clear existing stats and logs.
- Re-parse logs into PostgreSQL.
- Write migration marker and remove SQLite file.
API:
POST /api/logs/reparse
{
"id": "",
"migration": true
}Manual re-parse
POST /api/logs/reparse
{
"id": ""
}Notes
- During migration, stats may be incomplete until parsing finishes.
- Ensure log files are readable and not deleted.
- Changing
websites[].namecreates a new site ID.