Appearance
metaplay database import-snapshot
Import database snapshot from a file
Appearance
Import database snapshot from a file
metaplay database import-snapshot [ENVIRONMENT] [INPUT_FILE] [flags] Import database snapshot from a file created by 'database export' into the target environment.
WARNING: This is a destructive operation and will PERMANENTLY OVERWRITE ALL DATA in the target environment's database!
Safety protections:
For multi-shard environments, each shard snapshot will be restored to the corresponding shard in the target environment (shard_0.sql.gz → shard 0, etc.). The target environment must have the same number of shards as the snapshot, or otherwise the command will fail.
Expected arguments:
Related commands:
# Import database snapshot to 'nimbly' environment (asks for manual confirmation)
metaplay database import-snapshot nimbly snapshot.mdb
# Auto-accept import without confirmation prompt
metaplay database import-snapshot nimbly snapshot.mdb --yes
# Import to production environment (requires additional confirmation)
metaplay database import-snapshot production snapshot.mdb --yes --confirm-production--confirm-production: Required flag when importing to production environments--force: Proceed with import even if a game server is deployed (DANGEROUS!)--yes: Skip confirmation prompt and proceed with import--color <string>: Should the output be colored (yes/no/auto)? [env: METAPLAYCLI_COLOR] (default: auto)--project <string>: Path to the to project directory (where metaplay-project.yaml is located)--skip-version-check: Skip the check for a new CLI version being available--verbose: Enable verbose logging, useful for troubleshooting [env: METAPLAYCLI_VERBOSE]