Browse docs

Database, Backup, and Restore

Understand Crime System persistence, automatic migrations, backups, imports, restores, and update verification.

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.

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.

What creates the schema

OwnerShipped behaviorImportant scope
Config.AutoExecuteQueryEnabledMain Crime tables and migrations
Config.HeistPersistence.enabledEnabled with its own persistenceHeist definitions and player plans
Config.HeistPersistence.autoMigrateEnabledsky_crime_heist_definitions, sky_crime_heist_plans, and planning locations
Config.PvPEvents.autoMigrateEnabledPvP event and template state
import.sqlManual alternative for most main tablesDoes not replace the separate heist-table migration

Persistence groups

Safe update workflow

Stop new gameplay

Use a maintenance window and prevent players from starting heists, trades, work orders or raids during the backup.

Back up database and files

Capture the Crime tables plus the installed config folder, heist JSON files and intentional exports.

Apply the update

Keep automatic migrations enabled unless you deliberately maintain every schema yourself. Follow the current changelog's changed-file instructions.

Verify startup

Read the first migration or startup error. Do not continue testing when one table group failed.

Verify saved state

Check one organization, heist plan, Creator entry, owned facility and player progression record.

Run fresh gameplay

Create a new activity and complete it as a regular player before reopening the server.

Import and restore are different

ActionIntended useImportant effect
/jobconfigimport sky_crimesystemApply loaded Lua values to supported saved configurationCan change organizations and membership model; does not import Drug Creator or heist definitions
Restore shipped defaultsRebuild registered organization setup and settingsClears configuration history and can remove organizations not present in registered defaults
Database restoreRecover a known consistent server stateMust match the related resource files and schema version
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.

See Configuration and Changelog.