Updating Resources
Keeping your Zerio-Scripts resources up-to-date ensures you have the latest features, security improvements, and bug fixes. This guide covers everything you need to know about safely updating your resources.
🔔 Update Notifications
How to Know When Updates Are Available
Console Warning Example
When a resource is outdated, you’ll see a message similar to:
[WARN] zerio-bossmenu: This resource is outdated!
Current version: v1.2.0, Latest version: v1.3.0
Please update from: https://keymaster.fivem.net
Don’t Ignore Updates: Outdated resources may have security vulnerabilities, compatibility issues, or missing features. We strongly recommend keeping all resources current.
📋 Pre-Update Checklist
Create a Complete Backup
Before updating any resource, always create a backup:
- Full server files backup
- Database backup
- Configuration files backup
- Custom modifications documentation
Review Update Notes
Check our Discord or documentation for:
- Breaking changes that might affect your setup
- New configuration options
- Database schema changes
- Compatibility requirements
Plan Maintenance Window
- Schedule updates during low-traffic periods
- Notify your community about potential downtime
- Have a rollback plan ready
Test Environment
If possible, test updates on a development server first:
- Clone your production environment
- Test all functionality after updating
- Verify custom modifications still work
🔄 Update Process
Method 1: Standard Update (Recommended)
Windows Server Update: 1. Stop your FiveM server 2. Download
latest version from Keymaster 3. Backup
current resource: Copy zerio-resourcename
to a backup folder 4.
Extract new files: Unzip the downloaded update 5. Replace old files:
Delete old resource folder and replace with new one 6. Restore
configurations: Copy your custom configuration files back 7. Check SQL
updates: Import any new SQL files if provided 8. Start server: Restart
your FiveM server 9. Test functionality: Verify everything works
correctly
Method 2: In-Place Update (Advanced Users)
This method updates files without full replacement:
- Compare file structures between old and new versions
- Replace modified files individually
- Merge configuration changes manually
- Test thoroughly before going live
Risk Warning: In-place updates can be risky if not done correctly. We recommend the standard replacement method for most users.
⚙️ Configuration Migration
Preserving Your Settings
Most updates maintain backward compatibility with existing configurations, but sometimes manual migration is needed:
Automatic Configuration Migration
Many newer resources include automatic migration systems:
-- The resource will detect and upgrade old config formats
Config.AutoMigrate = true -- Usually enabled by default
Manual Configuration Updates
When manual updates are required:
- Compare config files: Use a text editor with diff capabilities
- Identify new options: Look for new configuration sections
- Preserve customizations: Keep your existing settings where possible
- Add new requirements: Include any new mandatory settings
Configuration Backup Strategy
# Before updating, save your configs
cp config.lua config.lua.backup
cp -r shared/ shared.backup/
cp -r config/ config.backup/
Common Configuration Changes
Framework Updates:
-- Old format
Config.Framework = 'qb-core'
-- New format (example)
Config.Framework = {
name = 'qb-core',
version = 'latest'
}
New Feature Toggles:
-- New features are often disabled by default
Config.NewFeature = {
enabled = false,
setting1 = 'default_value',
setting2 = true
}
🗃️ Database Updates
SQL Schema Updates
Some updates include database schema changes:
Check for SQL Files
Look for new SQL files in the updated resource:
sql/update_v1.3.0.sql
sql/migration_latest.sql
- Update notes mentioning database changes
Backup Your Database
Always backup before running SQL updates:
-- Create a backup
mysqldump -u username -p database_name > backup_before_update.sql
Import Update Scripts
Import any provided SQL update files:
mysql -u username -p database_name < sql/update_v1.3.0.sql
Verify Changes
Check that the database updates completed successfully:
- Review console output for errors
- Verify new tables/columns exist
- Test resource functionality
Database Compatibility: Most updates include both full install SQL files and incremental update files. Use the update files if you’re upgrading from a previous version.
🧪 Post-Update Testing
Comprehensive Testing Checklist
After updating, thoroughly test your resource:
Basic Functionality:
- ✅ Resource starts without errors
- ✅ No console warnings or errors
- ✅ Basic commands work correctly
- ✅ User interface displays properly
Data Integrity:
- ✅ Existing data loads correctly
- ✅ New data saves properly
- ✅ Database queries execute successfully
- ✅ User permissions work as expected
Integration Testing:
- ✅ Framework integration still works
- ✅ Other resources remain compatible
- ✅ Target systems function correctly
- ✅ Society/job systems operate normally
Performance Testing:
- ✅ No significant performance degradation
- ✅ Memory usage remains stable
- ✅ No new lag or stuttering
- ✅ Multi-player testing successful
🚨 Troubleshooting Updates
Common Update Issues
Configuration Errors:
Error: Config option 'OldSetting' is deprecated
Solution: Update your config.lua to use the new setting names
Database Schema Mismatches:
Error: Unknown column 'new_field' in 'table_name'
Solution: Import the database update SQL file
Framework Compatibility:
Error: QBCore function not found
Solution: Ensure your framework is up-to-date
Rollback Procedure
If an update causes issues:
Stop the Server
Immediately stop your FiveM server to prevent data corruption
Restore Files
Replace the updated resource with your backup:
rm -rf zerio-resourcename/
cp -r zerio-resourcename-backup/ zerio-resourcename/
Restore Database
If database changes were made:
mysql -u username -p database_name < backup_before_update.sql
Restart and Verify
Start your server and verify everything works as before
Report Issues
Contact support with detailed information about the problem
📢 Update Best Practices
Recommended Schedule
- Check for updates: Weekly
- Apply critical updates: Within 24-48 hours
- Schedule major updates: During maintenance windows
- Test updates: On development servers first
Automation Tips
Consider creating update scripts for frequently updated resources:
#!/bin/bash
# update-resource.sh
RESOURCE_NAME="zerio-bossmenu"
BACKUP_DIR="/backups/$(date +%Y%m%d)"
# Create backup
mkdir -p $BACKUP_DIR
cp -r resources/$RESOURCE_NAME $BACKUP_DIR/
# Download and extract new version
# (Add your download logic here)
# Restart server
screen -S fivem -X stuff "refresh\n"
screen -S fivem -X stuff "restart $RESOURCE_NAME\n"
Stay updated and secure! Regular updates ensure your server runs smoothly with the latest features and security improvements.