3.4 KiB
3.4 KiB
Upgrade Guide
Checking Your Version
Current version: Check the package.json file or look at the UI footer.
Upgrade Process
Option 1: Git Repository (Recommended)
If you deployed using git:
cd /opt/resource-monitor
git pull origin main
npm install
cd client && npm run build && cd ..
git add -f client/build/
git commit -m "Update build files after upgrade"
git push
pm2 restart resource-monitor
Then hard-refresh your browser (Ctrl+Shift+R) to clear cache and load the new version.
Option 2: Manual Update
- Backup your data:
cp -r data/ data.backup
cp .env data.backup/
- Download latest version:
# Download zip from GitHub and extract to a new folder
# Or clone fresh: git clone https://github.com/nmemmert/monitor.git monitor-new
- Copy your configuration:
cp data.backup/.env monitor-new/
- Install and build:
cd monitor-new
npm run install-all
cd client && npm run build && cd ..
- Stop old version and start new:
pm2 stop resource-monitor
pm2 delete resource-monitor
pm2 start server/index.js --name resource-monitor
pm2 save
- Restore data (if needed):
# If you want to preserve old database:
cp data.backup/skywatch.db data/
Option 3: Docker Update
# Pull latest image
docker pull your-registry/resource-monitor:latest
# Stop old container
docker stop monitor
# Start new container with same volume
docker run -d -p 3001:3001 -v resource-data:/app/data --name monitor resource-monitor:latest
# Clean up old container
docker rm monitor-old
What to Check After Upgrade
- Access the dashboard: Visit http://your-server:3001
- Check resources: Verify all resources are still configured
- Test notifications: Send test email/webhook from Settings
- View history: Verify historical data is intact
- Monitor logs:
pm2 logs resource-monitorfor any errors
Rollback
If something goes wrong:
# If using git:
git revert HEAD
npm install
pm2 restart resource-monitor
# If using manual backup:
# Stop the new version and restore old version from backup
pm2 stop resource-monitor
# Copy old files back
pm2 start resource-monitor
Breaking Changes by Version
v1.0 → v1.1
- Database schema may be upgraded automatically
- No manual action required
- Check logs if issues occur
v1.1 → v2.0
- Node.js 16+ required (was 14+)
- Update your Node.js before upgrading
- Check
.envfor any new required settings
Troubleshooting Upgrades
White screen after upgrade
- Hard refresh browser (Ctrl+Shift+R)
- Clear all browser cache
- Check console for JavaScript errors (F12)
Database errors
- Ensure
data/directory is writable - Check disk space:
df -h - Verify database integrity:
sqlite3 data/skywatch.db "PRAGMA integrity_check;"
Resources not checking
- Verify resources still exist:
pm2 logs resource-monitor - Re-enable resources in dashboard if needed
- Check network connectivity from server
Notifications not working
- Test email/webhook from Settings page
- Review server logs for errors
- Check that EMAIL_ENABLED and WEBHOOK_ENABLED are still set
Staying Updated
To get notifications about new releases:
- Watch the GitHub repository
- Star the project
- Enable notifications in GitHub settings
Support
Having upgrade issues? Check the Troubleshooting Guide or open an issue on GitHub.