Skip to content

Platform Backups

EaseLab runs automated platform-wide backups of the PostgreSQL platform database, all tenant databases, and file uploads. Operators configure storage, schedule, and retention from the admin portal.

Backup contents

Each backup run produces a manifest:

ComponentFileDescription
Platform DBplatform.dumpTenants, users, subscriptions, backup metadata
Tenant DBs{slug}.dump per tenantFull lab data
Uploadsuploads.tar.gzShared and per-tenant files

Storage providers

ProviderConfigurationUse case
LocalStoragePath on API serverDevelopment, single-server deployments
S3Bucket, region, access keysProduction, off-site redundancy

S3 settings

FieldDescription
BucketS3 bucket name
RegionAWS region (e.g. us-east-1)
PrefixKey prefix (default easelab-backups)
AccessKeyId / SecretAccessKeyIAM credentials
ServiceUrlOptional — for MinIO or S3-compatible stores
ForcePathStyleRequired for some S3-compatible endpoints

When S3 is enabled, local staging files can be deleted after successful upload (DeleteLocalStagingAfterS3Upload).

Schedule and retention

Configure via Admin Portal → Backups → Settings or PUT /admin/backups/settings:

SettingDefaultDescription
EnabledtrueMaster switch
IntervalHours1Scheduled backup frequency
DefaultRetentionDays3Standard tenant backup retention
GoldRetentionDays7Extended retention for priority tenants
PlatformRetentionDays7Platform-level backup retention

Manual backups can be triggered anytime with POST /admin/backups.

Backup run statuses

StatusMeaning
PendingQueued
RunningIn progress
CompletedSuccess
FailedCheck error field
RestoringRestore in progress

Stale Running backups older than 15 minutes are marked failed on API startup.

Restore scopes

ScopeValueEffectConfirmation
Full platformFullPlatformReplaces platform DB + all tenant DBs + uploadsType exact confirmation phrase
Single tenantSingleTenantReplaces one tenant's DB and uploadstenantId + confirmation

Platform restore: POST /admin/backups/{id}/restore

json
{
  "scope": "SingleTenant",
  "tenantId": "00000000-0000-0000-0000-000000000001",
  "confirmation": "RESTORE"
}

DANGER

Full platform restore is destructive. All current data is replaced. Perform only during maintenance windows with verified backup integrity.

Tenant-level backups

Tenant owners can list and restore their own backups (from platform backup manifests):

EndpointDescription
GET /tenant/backupsList backups containing this tenant
POST /tenant/backups/{id}/restoreOwner-only restore with data-loss acknowledgment

See How-To: Backup & Restore.

PostgreSQL tools

The API server needs pg_dump and pg_restore available:

SettingPurpose
PgDumpPathPath to pg_dump binary
PgRestorePathPath to pg_restore binary
PgBinDirectoryOptional bin directory (Windows)

Ease Lab — Cloud Pathology Lab Management