Upgrade Process
Standard Upgrade
To upgrade ew-npvr to a new version, follow these steps:
Stop the service:
systemctl stop ew-npvrInstall the new version:
dnf upgrade ./ew-npvr-x.y.z-1.el8.x86_64.rpmReview configuration changes:
Start the service:
systemctl start ew-npvrVerify the upgrade:
systemctl status ew-npvr journalctl -u ew-npvr -n 50
Database Schema Upgrades
Database schema migrations are handled automatically by the service on startup. When upgrading:
- Ensure database connection is configured and accessible
- The service will apply any necessary schema migrations on first start
- Monitor logs for migration status:
journalctl -u ew-npvr -f
Backup Recommendation: Before upgrading, backup your PostgreSQL database:
pg_dump -h localhost -U npvr_user npvr_db > npvr_backup_$(date +%Y%m%d).sql
Rolling Back
If you need to roll back to a previous version:
Stop the service:
systemctl stop ew-npvrDowngrade the package:
dnf downgrade ew-npvr-<previous-version>Restore database if needed:
# Only if database schema changed psql -h localhost -U npvr_user npvr_db < npvr_backup_YYYYMMDD.sqlStart the service:
systemctl start ew-npvr
Compatibility Notes
- Database: Schema changes are forward-compatible but not backward-compatible. Always backup before upgrading.
- Configuration: New configuration options have default values, so existing configurations remain valid.
- API: The Management API maintains backward compatibility within major versions.
- Storage: Recording storage format is backward-compatible.
Testing the Upgrade
After upgrading, verify functionality:
Check service health:
curl http://localhost:8099/List existing recordings:
curl http://localhost:8099/api/v1/content?limit=10Create a test recording:
curl -X POST http://localhost:8099/api/v1/content \ -H "Content-Type: application/json" \ -d '{ "channelName": "test-channel", "title": "Upgrade Test", "startTime": '$(date +%s)', "stopTime": '$(( $(date +%s) + 3600 ))' }'Verify logs:
journalctl -u ew-npvr -n 100 --no-pager
Common Upgrade Issues
Service fails to start:
- Check logs:
journalctl -u ew-npvr -n 50 - Verify configuration syntax
- Check file permissions
- Ensure database is accessible
Database migration fails:
- Check PostgreSQL connectivity
- Verify user has schema modification permissions
- Review migration logs in service output
- Consider restoring backup and retrying
Recordings not accessible:
- Verify storage paths haven’t changed
- Check file permissions on storage locations
- Review configuration for storage location names
- Ensure media API is properly configured
Performance degradation:
- Check content info cache size setting
- Review write rate limit if enabled
- Monitor database query performance
- Verify disk I/O isn’t saturated
Version-Specific Notes
Check the release notes for version-specific upgrade instructions and breaking changes.