Skip to content

Cesivi StorageConverter

Introduced: v1.0 — Archive metadata preservation added in v1.2 (PLAN-1620)

Cesivi.StorageConverter migrates the Cesivi data store between storage backends. Supported backends: FileSystem, InMemory, Sqlite, SqlServer, MySql, LiteDb.


Basic usage

cd Cesivi.StorageConverter
dotnet run -- convert \
    --source-type FileSystem --source-path /data/cesivi \
    --target-type Sqlite --target-path /data/cesivi.db

Run dotnet run -- --help for full option reference.


Archive metadata preservation

When converting an archive farm, the converter copies all seven archive substores in addition to the standard entity tree (webs, lists, items, files):

Substore Mover Notes
IArchivedFarmStore ArchivedFarmStoreMover Source-farm records referenced by webs
IIdentitySnapshotStore IdentitySnapshotStoreMover Frozen user identities per farm
IArchivedAclStore ArchivedAclStoreMover Frozen ACL snapshots per farm
WORM audit log WormAuditLogStoreMover Sealed JSONL segment files (byte-for-byte copy)
Integrity records IntegrityStoreMover Per-item hash records
Retention records ArchiveRetentionStoreMover Per-item retention windows
Legal holds ArchiveLegalHoldStoreMover Active holds + read-access log

WORM safety guarantees

The WORM audit log is copied byte-for-byte. After the copy: - OS-level ReadOnly attribute (Windows) / chattr +i (Linux) is re-applied on target files that had it on the source. - The hash chain is NOT recomputed — the source's chain is the authoritative record; the target stores it verbatim. - If --verify-worm-chains is passed (default: enabled), the WORM chain verification service validates each target segment after copy. A mismatch is reported in result.Errors but does not abort the conversion.

Non-FileSystem targets

The WORM, Integrity, Retention, and LegalHold movers work with raw file copy and require both source and target to be FileSystem-backed. If either side is a database (Sqlite, SqlServer, etc.), those four movers return 0 (no records copied) and log a warning. The three store-interface movers (ArchivedFarmStore, IdentitySnapshotStore, ArchivedAclStore) work with any backend pair.

Disabling archive metadata pass

dotnet run -- convert ... --no-archive-metadata

This skips all seven movers. Use when converting a non-archive farm where the substores are empty.


Conversion result output

At the end of a conversion the CLI prints per-mover counts when any archive records were copied:

Archive metadata copied:
  Archived farms       :  1
  Identity snapshots   :  234
  Archived ACLs        : 1892
  WORM segments        :  12
  Integrity records    : 8194
  Retention records    : 8194
  Legal holds          :   3
  Read-access log entries: 0

Errors (if any) are listed below the table.


See also