[{"data":1,"prerenderedAt":325},["ShallowReactive",2],{"/docs/jobs/crimesystem/reference/database-backup-and-restore":3,"/docs/jobs/crimesystem/reference/database-backup-and-restore-surround":313,"/docs/jobs/crimesystem/reference/database-backup-and-restore-implemented-suggestions":324},{"id":4,"title":5,"body":6,"description":303,"extension":304,"head":305,"implementedSuggestions":305,"meta":306,"navigation":307,"path":308,"schemaOrg":305,"seo":309,"sitemap":310,"stem":311,"__hash__":312},"docs/1.docs/0.jobs/4.crimesystem/6.reference/3.database-backup-and-restore.md","Database, Backup, and Restore",{"type":7,"value":8,"toc":294},"minimark",[9,13,21,26,120,124,163,167,217,221,273,280],[10,11,12],"p",{},"Crime System stores configuration, ownership, progress, running operations and audit history across several table groups. A copy of the resource folder is therefore not a complete backup.",[14,15,18],"callout",{"color":16,"icon":17},"warning","i-lucide-database-backup",[10,19,20],{},"Create a consistent database backup before imports, restored defaults, schema updates or a release change. Also back up customized Lua and JSON files from the resource.",[22,23,25],"h2",{"id":24},"what-creates-the-schema","What creates the schema",[27,28,29,45],"table",{},[30,31,32],"thead",{},[33,34,35,39,42],"tr",{},[36,37,38],"th",{},"Owner",[36,40,41],{},"Shipped behavior",[36,43,44],{},"Important scope",[46,47,48,63,76,95,107],"tbody",{},[33,49,50,57,60],{},[51,52,53],"td",{},[54,55,56],"code",{},"Config.AutoExecuteQuery",[51,58,59],{},"Enabled",[51,61,62],{},"Main Crime tables and migrations",[33,64,65,70,73],{},[51,66,67],{},[54,68,69],{},"Config.HeistPersistence.enabled",[51,71,72],{},"Enabled with its own persistence",[51,74,75],{},"Heist definitions and player plans",[33,77,78,83,85],{},[51,79,80],{},[54,81,82],{},"Config.HeistPersistence.autoMigrate",[51,84,59],{},[51,86,87,90,91,94],{},[54,88,89],{},"sky_crime_heist_definitions",", ",[54,92,93],{},"sky_crime_heist_plans",", and planning locations",[33,96,97,102,104],{},[51,98,99],{},[54,100,101],{},"Config.PvPEvents.autoMigrate",[51,103,59],{},[51,105,106],{},"PvP event and template state",[33,108,109,114,117],{},[51,110,111],{},[54,112,113],{},"import.sql",[51,115,116],{},"Manual alternative for most main tables",[51,118,119],{},"Does not replace the separate heist-table migration",[22,121,123],{"id":122},"persistence-groups","Persistence groups",[125,126,127,135,142,149,156],"accordion",{},[128,129,132],"accordion-item",{"icon":130,"label":131},"i-lucide-file-cog","Configuration and definitions",[10,133,134],{},"Territory configuration, Drug Creator entries and items, heist definitions, laboratory sites and other reusable definitions describe what can exist.",[128,136,139],{"icon":137,"label":138},"i-lucide-building-2","Ownership and facilities",[10,140,141],{},"Laboratories, campers, business state, workers, equipment, treasury, inventory, access and organization facilities describe who owns and operates a system.",[128,143,146],{"icon":144,"label":145},"i-lucide-chart-no-axes-column-increasing","Player progress",[10,147,148],{},"Plants, batches, reputation, contacts, heat, market state, routes, territory influence and PvP registration survive normal reconnects according to their lifecycle.",[128,150,153],{"icon":151,"label":152},"i-lucide-activity","Running operations",[10,154,155],{},"Heist plans, work orders, darknet orders, drug threats and raids may contain time-sensitive state. Restore them only together with the definitions and ownership rows they reference.",[128,157,160],{"icon":158,"label":159},"i-lucide-scroll-text","Logs and audit data",[10,161,162],{},"Ledgers, sales, market actions, reports and optional interrogation logs explain past mutations. Keep them when you need traceability.",[22,164,166],{"id":165},"safe-update-workflow","Safe update workflow",[168,169,170,175,178,182,189,193,196,200,203,207,210,214],"steps",{},[171,172,174],"h3",{"id":173},"stop-new-gameplay","Stop new gameplay",[10,176,177],{},"Use a maintenance window and prevent players from starting heists, trades, work orders or raids during the backup.",[171,179,181],{"id":180},"back-up-database-and-files","Back up database and files",[10,183,184,185,188],{},"Capture the Crime tables plus the installed ",[54,186,187],{},"config"," folder, heist JSON files and intentional exports.",[171,190,192],{"id":191},"apply-the-update","Apply the update",[10,194,195],{},"Keep automatic migrations enabled unless you deliberately maintain every schema yourself. Follow the current changelog's changed-file instructions.",[171,197,199],{"id":198},"verify-startup","Verify startup",[10,201,202],{},"Read the first migration or startup error. Do not continue testing when one table group failed.",[171,204,206],{"id":205},"verify-saved-state","Verify saved state",[10,208,209],{},"Check one organization, heist plan, Creator entry, owned facility and player progression record.",[171,211,213],{"id":212},"run-fresh-gameplay","Run fresh gameplay",[10,215,216],{},"Create a new activity and complete it as a regular player before reopening the server.",[22,218,220],{"id":219},"import-and-restore-are-different","Import and restore are different",[27,222,223,236],{},[30,224,225],{},[33,226,227,230,233],{},[36,228,229],{},"Action",[36,231,232],{},"Intended use",[36,234,235],{},"Important effect",[46,237,238,251,262],{},[33,239,240,245,248],{},[51,241,242],{},[54,243,244],{},"/jobconfigimport sky_crimesystem",[51,246,247],{},"Apply loaded Lua values to supported saved configuration",[51,249,250],{},"Can change organizations and membership model; does not import Drug Creator or heist definitions",[33,252,253,256,259],{},[51,254,255],{},"Restore shipped defaults",[51,257,258],{},"Rebuild registered organization setup and settings",[51,260,261],{},"Clears configuration history and can remove organizations not present in registered defaults",[33,263,264,267,270],{},[51,265,266],{},"Database restore",[51,268,269],{},"Recover a known consistent server state",[51,271,272],{},"Must match the related resource files and schema version",[14,274,277],{"color":275,"icon":276},"success","i-lucide-circle-check-big",[10,278,279],{},"A restore passes only after saved definitions, ownership and player progress agree, and a new normal-player activity can write and reload its state successfully.",[10,281,282,283,288,289,293],{},"See ",[284,285,287],"a",{"href":286},"/docs/jobs/crimesystem/setup/configuration","Configuration"," and ",[284,290,292],{"href":291},"/docs/jobs/crimesystem/changelog","Changelog",".",{"title":295,"searchDepth":296,"depth":297,"links":298},"",1,2,[299,300,301,302],{"id":24,"depth":297,"text":25},{"id":122,"depth":297,"text":123},{"id":165,"depth":297,"text":166},{"id":219,"depth":297,"text":220},"Understand Crime System persistence, automatic migrations, backups, imports, restores, and update verification.","md",null,{},true,"/docs/jobs/crimesystem/reference/database-backup-and-restore",{"title":5,"description":303},{"loc":308},"1.docs/0.jobs/4.crimesystem/6.reference/3.database-backup-and-restore","pRXkxPUOVwCgv-Z2EeTb5-BAEVhy9evqxgLNeo7_T4k",[314,319],{"title":315,"path":316,"stem":317,"description":318,"children":-1},"Commands","/docs/jobs/crimesystem/reference/commands","1.docs/0.jobs/4.crimesystem/6.reference/2.commands","Player, administrator, setup and diagnostic commands available in Crime System.",{"title":320,"path":321,"stem":322,"description":323,"children":-1},"Supported Exports","/docs/jobs/crimesystem/reference/supported-exports","1.docs/0.jobs/4.crimesystem/6.reference/4.supported-exports","Find the public Crime System exports by runtime context and avoid relying on internal events or diagnostic commands.",[],1790629528855]