Documentation

    Documentation

    Documentation

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    Ring Platform Logo

    Завантаження документації...

    Підготовка контенту платформи Ring

    1. /
    2. /Backup & Recovery

    Updated Jun 22, 20264 min listen

    1. /
    2. /Backup & Recovery

    Updated Jun 22, 20264 min listen

    1. /
    2. /Backup & Recovery

    Updated Jun 22, 20264 min listen

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Architecture
    Data Model
    Real Time
    Discovery Mutation Sync
    Security
    Backend Services
    k8s-postgres-fcm Mode
    Firebase Integration
    Features
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Wallet & Credit System
    Multi-Vendor Store
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payments Overview
    PaymentConductor
    SubscriptionConductor
    VideoConductor
    News Module - Digital Newspaper Experience
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Branding
    Themes
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Examples
    Quick Start
    White Label
    Real World
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Architecture
    Data Model
    Real Time
    Discovery Mutation Sync
    Security
    Backend Services
    k8s-postgres-fcm Mode
    Firebase Integration
    Features
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Wallet & Credit System
    Multi-Vendor Store
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payments Overview
    PaymentConductor
    SubscriptionConductor
    VideoConductor
    News Module - Digital Newspaper Experience
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Branding
    Themes
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Examples
    Quick Start
    White Label
    Real World
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Architecture
    Data Model
    Real Time
    Discovery Mutation Sync
    Security
    Backend Services
    k8s-postgres-fcm Mode
    Firebase Integration
    Features
    Authentication
    Email AI-CRM
    Entities
    Opportunities
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Tunnel Protocol
    Wallet & Credit System
    Multi-Vendor Store
    Referral Codes (Refcodes)
    Affiliate & Referral Enablement
    Payments Overview
    PaymentConductor
    SubscriptionConductor
    VideoConductor
    News Module - Digital Newspaper Experience
    Member Blogs
    Public Profile Pages
    Username Reservation System
    Scientific Editor
    Locale System
    Security & Compliance
    NFT Marketplace
    Token Staking System
    Performance Optimization Patterns
    Mobile Experience
    Wallet
    Wallet Security Tips
    API
    Authentication
    Email AI-CRM API
    Entities
    Opportunities
    Messaging API
    Notifications API
    Wallet API
    Store API
    Admin API
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Branding
    Themes
    Web3
    Token launch jurisdictions
    Deployment
    Self-hosted deployment
    Vercel
    Docker
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Development
    Local Setup
    Code Structure
    Documentation components
    Community tooling
    Ring MCP Server
    Generative Images (ImageConductor)
    Autonomous Newsroom (Grok)
    OSS vs enterprise
    Whitelabel Navigation
    Best Practices
    Workflow
    Code Style
    Performance
    Testing
    Deployment
    Debugging
    Contributing
    MCP
    ring-image-create
    ring-video-create
    Examples
    Quick Start
    White Label
    Real World
    Integrations
    Ethereum wallets (Wagmi v3)

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Docs
    Deployment
    Docs
    Deployment
    Docs
    Deployment

    Backup & Recovery

    Filter with Founder / Developer in the docs sidebar. This page replaces legacy fiction (invented TypeScript managers, dollar KPIs, multi-region failover code that does not exist in the OSS tree). Everything below is traceable to data/schema.sql, env.local.template, and deployment docs.

    Ring clones on DB_BACKEND_MODE=k8s-postgres-fcm (production default) treat PostgreSQL as the source of truth for users, entities, opportunities, store, payments, and most CRM data. Backups must cover the database, uploaded files, and secrets/configuration — three separate artifacts with different restore steps.

    What you are protecting

    AssetTypical locationRestore priority
    PostgreSQLDATABASE_URL cluster or Docker volumeCritical — identities, commerce, content
    Schema + migrationsdata/schema.sql, data/migrations/*.sqlVersion-controlled in git; re-apply after empty restore
    Blob / object storageVercel Blob (BLOB_READ_WRITE_TOKEN) or clone-specific S3/RGWHigh — product images, attachments, generated media
    Runtime secrets.env.local, k8s Secrets (not in public repo)Critical — Auth.js, WayForPay/Stripe, FCM service account
    Redis cacheDocker ring-redis-data volumeLow — safe to rebuild; sessions may reset
    FCM tokensPostgres fcm_tokens JSONB when on postgres-primaryCovered by DB backup

    Why backup matters for your clone

    A Ring deployment is not “just a website.” Postgres holds membership state, vendor catalogs, order and payment ledgers, opportunity listings, and referral accounting. Losing the database without a restore point means re-onboarding users and reconciling payments manually.

    Typical scenarios

    Pre-launch clone

    Take a snapshot after schema apply and seed data — rollback if a bad migration runs on staging.

    Multi-vendor marketplace

    Orders and inventory live in Postgres; product images may live in Blob — back up both.

    Managed Ringdom hosting

    PostgreSQL-primary (k8s-postgres-fcm / supabase-fcm)

    Application data flows through DatabaseService → PostgreSQLAdapter. Backup = logical dump of the clone database (one DB per white-label clone, e.g. ring_platform, ring_greenfood_live).

    Logical backup (Docker dev — verified in data/SCHEMA-README.md)

    1. 1

      Dump to file

      For production-sized DBs prefer custom format (parallel restore, compression):

    2. 2

      Restore into an empty database

      Custom format:

    3. 3

      Re-apply migrations if restoring an old dump

      After restore, compare schema_versions / migration files under data/migrations/ with Database migrations. Apply any missing incremental SQL before starting the app.

    Connection string for native psql/pg_dump (no Docker):

    See Environment configuration for DB_* variables in env.local.template.

    Before destructive migrations

    Some migrations require a backup first — e.g. 013_users_email_unique.sql needs dedupe (scripts/dedupe-users-by-email.cts) documented in data/migrations/README.md. Always dump before running dedupe or role-normalization scripts.

    Blob storage (BLOB_READ_WRITE_TOKEN)

    Uploads use Vercel Blob when BLOB_READ_WRITE_TOKEN is set (docker-compose.yml, ). Blob objects are inside Postgres. Use your provider’s export/replication or treat uploads as rebuildable only if you accept media loss.

    Related documentation

    Data model

    JSONB collections included in Postgres dumps.

    Backend modes

    When Postgres vs Firestore owns application data.

    Docker deployment

    Compose services, volumes, and health checks.

    Database migrations

    Apply order after restore.

    Monitoring

    Backup & Recovery

    Filter with Founder / Developer in the docs sidebar. This page replaces legacy fiction (invented TypeScript managers, dollar KPIs, multi-region failover code that does not exist in the OSS tree). Everything below is traceable to data/schema.sql, env.local.template, and deployment docs.

    Ring clones on DB_BACKEND_MODE=k8s-postgres-fcm (production default) treat PostgreSQL as the source of truth for users, entities, opportunities, store, payments, and most CRM data. Backups must cover the database, uploaded files, and secrets/configuration — three separate artifacts with different restore steps.

    What you are protecting

    AssetTypical locationRestore priority
    PostgreSQLDATABASE_URL cluster or Docker volumeCritical — identities, commerce, content
    Schema + migrationsdata/schema.sql, data/migrations/*.sqlVersion-controlled in git; re-apply after empty restore
    Blob / object storageVercel Blob (BLOB_READ_WRITE_TOKEN) or clone-specific S3/RGWHigh — product images, attachments, generated media
    Runtime secrets.env.local, k8s Secrets (not in public repo)Critical — Auth.js, WayForPay/Stripe, FCM service account
    Redis cacheDocker ring-redis-data volumeLow — safe to rebuild; sessions may reset
    FCM tokensPostgres fcm_tokens JSONB when on postgres-primaryCovered by DB backup

    Why backup matters for your clone

    A Ring deployment is not “just a website.” Postgres holds membership state, vendor catalogs, order and payment ledgers, opportunity listings, and referral accounting. Losing the database without a restore point means re-onboarding users and reconciling payments manually.

    Typical scenarios

    Pre-launch clone

    Take a snapshot after schema apply and seed data — rollback if a bad migration runs on staging.

    Multi-vendor marketplace

    Orders and inventory live in Postgres; product images may live in Blob — back up both.

    Managed Ringdom hosting

    PostgreSQL-primary (k8s-postgres-fcm / supabase-fcm)

    Application data flows through DatabaseService → PostgreSQLAdapter. Backup = logical dump of the clone database (one DB per white-label clone, e.g. ring_platform, ring_greenfood_live).

    Logical backup (Docker dev — verified in data/SCHEMA-README.md)

    1. 1

      Dump to file

      For production-sized DBs prefer custom format (parallel restore, compression):

    2. 2

      Restore into an empty database

      Custom format:

    3. 3

      Re-apply migrations if restoring an old dump

      After restore, compare schema_versions / migration files under data/migrations/ with Database migrations. Apply any missing incremental SQL before starting the app.

    Connection string for native psql/pg_dump (no Docker):

    See Environment configuration for DB_* variables in env.local.template.

    Before destructive migrations

    Some migrations require a backup first — e.g. 013_users_email_unique.sql needs dedupe (scripts/dedupe-users-by-email.cts) documented in data/migrations/README.md. Always dump before running dedupe or role-normalization scripts.

    Blob storage (BLOB_READ_WRITE_TOKEN)

    Uploads use Vercel Blob when BLOB_READ_WRITE_TOKEN is set (docker-compose.yml, ). Blob objects are inside Postgres. Use your provider’s export/replication or treat uploads as rebuildable only if you accept media loss.

    Related documentation

    Data model

    JSONB collections included in Postgres dumps.

    Backend modes

    When Postgres vs Firestore owns application data.

    Docker deployment

    Compose services, volumes, and health checks.

    Database migrations

    Apply order after restore.

    Monitoring

    Backup & Recovery

    Filter with Founder / Developer in the docs sidebar. This page replaces legacy fiction (invented TypeScript managers, dollar KPIs, multi-region failover code that does not exist in the OSS tree). Everything below is traceable to data/schema.sql, env.local.template, and deployment docs.

    Ring clones on DB_BACKEND_MODE=k8s-postgres-fcm (production default) treat PostgreSQL as the source of truth for users, entities, opportunities, store, payments, and most CRM data. Backups must cover the database, uploaded files, and secrets/configuration — three separate artifacts with different restore steps.

    What you are protecting

    AssetTypical locationRestore priority
    PostgreSQLDATABASE_URL cluster or Docker volumeCritical — identities, commerce, content
    Schema + migrationsdata/schema.sql, data/migrations/*.sqlVersion-controlled in git; re-apply after empty restore
    Blob / object storageVercel Blob (BLOB_READ_WRITE_TOKEN) or clone-specific S3/RGWHigh — product images, attachments, generated media
    Runtime secrets.env.local, k8s Secrets (not in public repo)Critical — Auth.js, WayForPay/Stripe, FCM service account
    Redis cacheDocker ring-redis-data volumeLow — safe to rebuild; sessions may reset
    FCM tokensPostgres fcm_tokens JSONB when on postgres-primaryCovered by DB backup

    Why backup matters for your clone

    A Ring deployment is not “just a website.” Postgres holds membership state, vendor catalogs, order and payment ledgers, opportunity listings, and referral accounting. Losing the database without a restore point means re-onboarding users and reconciling payments manually.

    Typical scenarios

    Pre-launch clone

    Take a snapshot after schema apply and seed data — rollback if a bad migration runs on staging.

    Multi-vendor marketplace

    Orders and inventory live in Postgres; product images may live in Blob — back up both.

    Managed Ringdom hosting

    PostgreSQL-primary (k8s-postgres-fcm / supabase-fcm)

    Application data flows through DatabaseService → PostgreSQLAdapter. Backup = logical dump of the clone database (one DB per white-label clone, e.g. ring_platform, ring_greenfood_live).

    Logical backup (Docker dev — verified in data/SCHEMA-README.md)

    1. 1

      Dump to file

      For production-sized DBs prefer custom format (parallel restore, compression):

    2. 2

      Restore into an empty database

      Custom format:

    3. 3

      Re-apply migrations if restoring an old dump

      After restore, compare schema_versions / migration files under data/migrations/ with Database migrations. Apply any missing incremental SQL before starting the app.

    Connection string for native psql/pg_dump (no Docker):

    See Environment configuration for DB_* variables in env.local.template.

    Before destructive migrations

    Some migrations require a backup first — e.g. 013_users_email_unique.sql needs dedupe (scripts/dedupe-users-by-email.cts) documented in data/migrations/README.md. Always dump before running dedupe or role-normalization scripts.

    Blob storage (BLOB_READ_WRITE_TOKEN)

    Uploads use Vercel Blob when BLOB_READ_WRITE_TOKEN is set (docker-compose.yml, ). Blob objects are inside Postgres. Use your provider’s export/replication or treat uploads as rebuildable only if you accept media loss.

    Related documentation

    Data model

    JSONB collections included in Postgres dumps.

    Backend modes

    When Postgres vs Firestore owns application data.

    Docker deployment

    Compose services, volumes, and health checks.

    Database migrations

    Apply order after restore.

    Monitoring

    Settlers on ringdom.org k8s get operator-run CNPG/MinIO schedules; self-hosters own their own dump cadence.

    Compliance & audit

    PaymentConductor rows in payment_transactions support dispute resolution — include DB in retention policy.

    Planning RTO and RPO (your numbers)

    Ring Platform does not ship fixed recovery SLAs in the OSS repo. Define targets per clone:

    • RPO — how much data you can lose (e.g. “last nightly dump” vs “hourly logical backup”).
    • RTO — how long the clone can stay read-only or offline during restore.

    Document who approves restore (operator vs developer) and where dumps are stored (encrypted object storage, off-cluster).

    Secrets are not in the database

    AUTH_SECRET, WayForPay keys, and Firebase service accounts live in env/Secrets stores. Export them through your password manager or sealed-secrets workflow — a Postgres dump alone cannot rebuild auth.

    env.local.template
    not

    firebase-full mode (legacy / community)

    When DB_BACKEND_MODE=firebase-full, Firestore holds application data (shouldUseFirebaseForDatabase() in lib/database/backend-mode-config.ts). Use Google Cloud Firestore export/import to GCS — not the Postgres commands above. Postgres may still hold Auth.js adapter tables depending on adapter configuration; confirm your clone’s adapter in Authentication architecture.

    Kubernetes / Ringdom operators

    The public OSS repo does not ship k8s/ manifests (OSS vs enterprise). Managed clusters typically use CloudNativePG ScheduledBackup to S3-compatible storage (e.g. MinIO). Operator runbooks live outside this tree; align dump retention with your storage class and off-site copy policy.

    Backup scope — postgres-primary clone

    Recovery drill (minimal)

    1. 1

      Restore latest dump to a staging database name (not production).

    2. 2

      Run npm run build (or health check) against staging DATABASE_URL.

    3. 3

      Verify login, one entity read, one opportunity list query, and /api/health.

    4. 4

      Record dump age, restore duration, and gaps — adjust schedule if RPO missed.

    Alert on backup job failures (next doc in stale cohort).

    Settlers on ringdom.org k8s get operator-run CNPG/MinIO schedules; self-hosters own their own dump cadence.

    Compliance & audit

    PaymentConductor rows in payment_transactions support dispute resolution — include DB in retention policy.

    Planning RTO and RPO (your numbers)

    Ring Platform does not ship fixed recovery SLAs in the OSS repo. Define targets per clone:

    • RPO — how much data you can lose (e.g. “last nightly dump” vs “hourly logical backup”).
    • RTO — how long the clone can stay read-only or offline during restore.

    Document who approves restore (operator vs developer) and where dumps are stored (encrypted object storage, off-cluster).

    Secrets are not in the database

    AUTH_SECRET, WayForPay keys, and Firebase service accounts live in env/Secrets stores. Export them through your password manager or sealed-secrets workflow — a Postgres dump alone cannot rebuild auth.

    env.local.template
    not

    firebase-full mode (legacy / community)

    When DB_BACKEND_MODE=firebase-full, Firestore holds application data (shouldUseFirebaseForDatabase() in lib/database/backend-mode-config.ts). Use Google Cloud Firestore export/import to GCS — not the Postgres commands above. Postgres may still hold Auth.js adapter tables depending on adapter configuration; confirm your clone’s adapter in Authentication architecture.

    Kubernetes / Ringdom operators

    The public OSS repo does not ship k8s/ manifests (OSS vs enterprise). Managed clusters typically use CloudNativePG ScheduledBackup to S3-compatible storage (e.g. MinIO). Operator runbooks live outside this tree; align dump retention with your storage class and off-site copy policy.

    Backup scope — postgres-primary clone

    Recovery drill (minimal)

    1. 1

      Restore latest dump to a staging database name (not production).

    2. 2

      Run npm run build (or health check) against staging DATABASE_URL.

    3. 3

      Verify login, one entity read, one opportunity list query, and /api/health.

    4. 4

      Record dump age, restore duration, and gaps — adjust schedule if RPO missed.

    Alert on backup job failures (next doc in stale cohort).

    Settlers on ringdom.org k8s get operator-run CNPG/MinIO schedules; self-hosters own their own dump cadence.

    Compliance & audit

    PaymentConductor rows in payment_transactions support dispute resolution — include DB in retention policy.

    Planning RTO and RPO (your numbers)

    Ring Platform does not ship fixed recovery SLAs in the OSS repo. Define targets per clone:

    • RPO — how much data you can lose (e.g. “last nightly dump” vs “hourly logical backup”).
    • RTO — how long the clone can stay read-only or offline during restore.

    Document who approves restore (operator vs developer) and where dumps are stored (encrypted object storage, off-cluster).

    Secrets are not in the database

    AUTH_SECRET, WayForPay keys, and Firebase service accounts live in env/Secrets stores. Export them through your password manager or sealed-secrets workflow — a Postgres dump alone cannot rebuild auth.

    env.local.template
    not

    firebase-full mode (legacy / community)

    When DB_BACKEND_MODE=firebase-full, Firestore holds application data (shouldUseFirebaseForDatabase() in lib/database/backend-mode-config.ts). Use Google Cloud Firestore export/import to GCS — not the Postgres commands above. Postgres may still hold Auth.js adapter tables depending on adapter configuration; confirm your clone’s adapter in Authentication architecture.

    Kubernetes / Ringdom operators

    The public OSS repo does not ship k8s/ manifests (OSS vs enterprise). Managed clusters typically use CloudNativePG ScheduledBackup to S3-compatible storage (e.g. MinIO). Operator runbooks live outside this tree; align dump retention with your storage class and off-site copy policy.

    Backup scope — postgres-primary clone

    Recovery drill (minimal)

    1. 1

      Restore latest dump to a staging database name (not production).

    2. 2

      Run npm run build (or health check) against staging DATABASE_URL.

    3. 3

      Verify login, one entity read, one opportunity list query, and /api/health.

    4. 4

      Record dump age, restore duration, and gaps — adjust schedule if RPO missed.

    Alert on backup job failures (next doc in stale cohort).