Skip to content

Backup and restore

Start here to choose a backup. Use an engine backup to recover a complete database, or a portable backup to move application data between compatible Maryk stores.

I need to…UseRead next
Recover a RocksDB databaseNative RocksDB backupRocksDB recovery guide
Recover a FoundationDB deploymentFoundationDB’s backup toolsFoundationDB recovery guide
Save current records or transfer them to another backendPortable state backupState backup guide
Preserve and restore earlier record revisions as wellPortable history backupHistory backup guide

Native backups preserve engine state. Portable restore rebuilds application records and indexes; it does not clone the engine’s operational metadata.

StoreState backupHistory backup
Memory (InMemoryDataStore)YesYes
IndexedDB (browser storage)Yes, with atomic supportYes, with atomic support
RocksDBYesYes
FoundationDBYes, within its short snapshot windowYes, with an application-coordinated Maryk snapshot version
RemoteYes, with a compatible server and backing storeYes, with compatible snapshot and restore capabilities

Remote inherits its backing store’s limits. Check supportsStateBackup before using state backup; an older remote server reports it as unsupported.

StateHistory
APIbackupState / restoreStatebackup / restore
SavesCurrent records, including soft deletesCurrent and earlier retained values
Source keepAllVersionsEither settingMust be enabled before writes
Target keepAllVersionsMust be disabledMust be enabled

Choose state unless you need earlier revisions. Keeping creation/update versions in a state backup does not recreate those earlier values.

Restore into a new, isolated target with compatible model definitions. Read the whole archive, check the recovered data, and only then switch application traffic. A failed restore can leave earlier batches applied: discard that target and retry.

Protect backup storage and transport as production data. Keep encryption keys separately, store recovery copies off-device, and rehearse restores. Portable backup scheduling, retention and durable output storage belong to the application.

For adapter contracts, consistency details and resource limits, see the portable backup reference.