backup

bedrock_server_manager.db.backup.default_serializer(obj: Any) → str

JSON serializer for objects not serializable by default json code.

async bedrock_server_manager.db.backup.get_current_db_revision(engine: AsyncEngine | None) → str | None

Return the current Alembic revision from the database asynchronously.

async bedrock_server_manager.db.backup.get_backup_metadata(input_path: str) → Dict[str, Any]

Reads the metadata from a backup JSON file asynchronously.

async bedrock_server_manager.db.backup.backup_database(db: Database, output_path: str) → None

Backups all database records to a JSON file asynchronously.

async bedrock_server_manager.db.backup.restore_database(db: Database, backup_data: Dict[str, Any]) → None

Restores database records from a dictionary payload asynchronously. Wipes existing data!