5M Migration Tool
5M Migration Tool is a dedicated FiveM server resource engineered specifically to migrate player data from your previous phone script into 5M Phone with zero data loss.
🌟 Why Use 5M Migration Tool?
Switching phone scripts shouldn't penalize your players. In roleplay servers, phone numbers, contact books, camera albums, SMS threads, and notes represent months of character progression.
5M Migration Tool runs an automated, multi-batch conversion engine directly against your MySQL / MariaDB database, translating foreign table structures and metadata into 5M Phone's optimized schema while keeping your database safe.
📱 Supported Source Phones
The tool comes with built-in adapters for all major FiveM phone systems:
| Phone Script | Source Key (Config.SourcePhone) | Migrated Data |
|---|---|---|
| LB Phone | 'lb-phone' | Devices, phone numbers, contacts, call history, gallery photos, notes, 1:1 messages, mail accounts & messages, yellow pages, Twitter/xBird, Instagram, DarkChat accounts & messages, voice memos. |
| 17Movement Phone | '17mov_phone' | SIM cards, settings, contacts, chats & messages, gallery, notes, calls, voice messages, Qwuaker posts, Peargram. |
| GKS Phone | 'gks-phone' | Settings, eSIM, contacts, calls, SMS messages & groups, gallery, notes, mails, GPS pins, Twitter, Instagram, DarkChat, voice memos. |
| QB Phone (qb-phone) | 'qb-phone' | Phone numbers, player contacts, message threads, gallery photos, player mails, tweets. |
| NPWD | 'npwd' | Phone numbers, direct messages, photos, contacts. |
| okokPhone | 'okokphone' | Phone accounts, contacts, chats, call logs, photos. |
| Quasar Smartphone | 'qs-smartphone' | Phone numbers, metadata, threads & participants, messages, gallery photos, notes, Tweedle users & posts. |
| YSeries Phone | 'yseries' | yCloud accounts, settings, gallery, contacts, messages, notes. |
🛠️ Step-by-Step Migration Guide
Step 1: Backup Your Database
[!CAUTION] Always make a full SQL backup before running any database migration. Use mysqldump or HeidiSQL / phpMyAdmin to export a complete copy of your server database.
Step 2: Resource Placement & Dependencies
Place the 5M_Migrationtool folder inside your FiveM server's resources directory:
resources/
├── [phone]/
│ ├── 5M_Phone/
│ └── 5M_Migrationtool/Ensure both oxmysql and 5M_Phone are present.
Step 3: Configure config.lua
Open 5M_Migrationtool/config.lua and select your old phone script:
-- Pick ONE source phone:
Config.SourcePhone = 'lb-phone' -- 'lb-phone' | 'qb-phone' | 'qs-smartphone' | 'gks-phone' | 'okokphone' | 'yseries' | '17mov_phone'
-- Framework used for player identifiers ('qbx' | 'qb' | 'esx' | 'auto')
Config.Framework = 'auto'
-- Choose what data to migrate:
Config.Migrate = {
phones = true, -- Creates 5M profiles and registers phone numbers
contacts = true, -- Player contacts and favorites
gallery = true, -- Photos and camera albums
notes = true, -- Saved notes
messages = true, -- 1:1 SMS and chats
calls = true, -- Call history logs
mail = true, -- Player mail accounts and messages
maps = true, -- Saved GPS pins and waypoints
yellowpages = true, -- Yellow pages / business listings
twitter = true, -- Transferred to xBird
instagram = true, -- Transferred to Insta
darkchat = true, -- DarkChat handles and burner rooms
recordings = true, -- Voice memos
}🔒 Safety & Production Protection
The migration tool includes built-in fail-safes designed for production environments:
Config.BlockPlayerJoins = true: Temporarily defers incoming connections with a notice so players cannot alter phone tables mid-migration.Config.KickOnlinePlayers = true: Safely drops connected players before starting.Config.DryRun = false: Set totruefirst to scan, validate, and report count of rows without writing any changes to MySQL.Config.BatchSize = 200: Queries are inserted in chunks of 200 to prevent MySQL packet timeouts and server stalls.Config.ForceRerun = false: The tool locks itself into5m_phone_migration_stateupon successful completion so it never runs accidentally twice.
⚡ Execution
- Stop or comment out your old phone resource in
server.cfg. - Add both resources in order:
ensure oxmysql
ensure 5M_Phone
ensure 5M_Migrationtool- Start the server (or run
ensure 5M_Migrationtoolin server console). - Monitor server console:
[5MMigrate] Framework detected: qbox
[5MMigrate] Running adapter for lb-phone...
[5MMigrate] Migrated 1,420 phones.
[5MMigrate] Migrated 8,912 contacts.
[5MMigrate] Migrated 5,230 gallery photos.
[5MMigrate] Migrated 14,810 messages.
[5MMigrate] SUCCESS: All selected datasets migrated cleanly!- Once migration finishes, remove or disable
5M_Migrationtoolinserver.cfgand restart your server.
