Repository navigation
Come Home Hasura Cloud
Moves a Hasura Cloud project (or any Hasura with its own Postgres and no platform
auth) into a fresh nSelf project: the database through a repeatable-read snapshot
and the Hasura metadata through export_metadata. This source carries no users: a
Hasura project has no built-in accounts. If the database has an auth schema or
hasura-storage files (storage.files with rows) it is an nhost project, or close to
one; the command says so and stops. Use
nself db import nhost instead.
- Start a fresh nSelf project. Postgres and Hasura must be healthy.
- You need a direct Postgres connection string to the database that Hasura is connected to (Hasura Cloud does not host the database itself; it is the one you attached, for example on Neon, RDS or Heroku), the project's Hasura base URL, and the admin secret.
- Use a source on PostgreSQL 12 or later, with a major no newer than the target.
- Stop writes to the source while you copy.
Every secret goes in an environment variable; the flags take the variable's name.
The Hasura URL must be https (plain http only for loopback). A console URL ending
in /v1/graphql is accepted.
nself db import hasura-cloud --db-url-env SRC_URL --hasura-url https://my-project.hasura.app --admin-secret-env SRC_ADMIN_SECRET --plan --json
nself db import hasura-cloud --db-url-env SRC_URL --hasura-url https://my-project.hasura.app --admin-secret-env SRC_ADMIN_SECRET --jsonIn v1.4 mode the command is nself migrate hasura-cloud. In v1.5 mode it lives
under db import. The plan proves the admin secret and the database connection and
writes nothing.
| Part | How |
|---|---|
| Tables | Every user schema's tables with their data, constraints and indexes (not hdb_catalog, auth or nSelf's own). |
| Metadata | Tracked tables, relationships, computed fields and per-role permissions for the tables that came across. Connection strings are never copied. Tracked functions are recorded in the bundle and the SQL functions themselves come across with the schema, but the load does not track them in Hasura yet: track them again after the import. |
Not carried: event triggers, actions, remote schemas, cron triggers, inherited roles,
query collections and any Hasura database source other than default (the import stops
if the project has no default source). Tracked views, materialized views and foreign
tables are not carried, so their relationships and permissions are not recreated:
re-create them on the target after the import. Every tracked table, function and extra
source that is left out is listed in the report's exemptions with the reason
kind: metadata, and the manifest counts the skipped actions and remote schemas.
The JSON envelope and .nself/import/<run-id>/report.json give per-table counts and
the metadata comparison (tracking, relationships, permissions). A pass means every
non-exempt row count, content hash and metadata record matched. E523 means a
mismatch; E522 means verification could not run. A second import into the same
target is refused with E519.
report.json records wrote and last_step. If wrote is false nothing reached
the target: fix the cause and rerun. If it is true, reset the fresh target and rerun
(db reset drops the project database, so use it only on the target you were
importing into):
nself db reset --yes
nself stop
nself startA failed run keeps its private stage under .nself/import/ (a copy of your data, mode
0600): delete it when you are done. The same recovery rules as
Come home from PostgreSQL apply.
Getting Started
Commands
- Commands, Overview
- Lifecycle: cmd-init · cmd-build · cmd-start · cmd-stop · cmd-restart · cmd-dev
- Monitoring: cmd-status · cmd-logs · cmd-health · cmd-urls · cmd-doctor · cmd-monitor · cmd-alerts · cmd-sentry · cmd-watchdog
- Data: cmd-db · cmd-backup · cmd-dr · cmd-queue · cmd-webhooks
- Config: cmd-config · cmd-service · cmd-env · cmd-promote
- Networking: cmd-ssl · cmd-trust · cmd-dns-setup
- Security: cmd-access · cmd-security · cmd-secrets
- Tenancy: cmd-tenant · cmd-billing
- Plugins: cmd-plugin · cmd-license · cmd-dogfood (extracted, CLI-R11) · cmd-k8s (extracted, CLI-R11) · cmd-encryption (extracted, CLI-R11) · cmd-waf (extracted, CLI-R11) · cmd-federation (extracted, CLI-R11) · cmd-mail (extracted, CLI-R11) · cmd-dlq (extracted, CLI-R11)
- AI: cmd-ai · cmd-claw · cmd-model
- Templates: cmd-template
- Utilities: cmd-exec · cmd-clean · cmd-reset · cmd-update · cmd-upgrade · cmd-version · cmd-admin · cmd-migrate · cmd-migrate-firebase · cmd-migrate-supabase · cmd-completion
Features
- Features, Overview
- Feature-Auth
- Feature-Storage
- Feature-Search
- Feature-Functions
- Feature-Email
- Feature-Monitoring
- Feature-Plugins
- Feature-nClaw, AI Assistant
- Feature-nChat, Messaging
- Feature-nFamily, Family Social
- Feature-nCloud, Managed Hosting
- Feature-Memory-Rooms, Knowledge Organization
- Feature-Agent-Dashboard, Agent Metrics
- Feature-Image-Generation, AI Image Generation
Configuration
- Configuration, Overview
- Config-Env-Vars
- Config-Postgres
- Config-Hasura
- Config-Auth
- Config-Nginx
- Shared-Proxy
- Config-Optional-Services
- Config-Custom-Services
- Config-System
Plugins (87 + 10 monitoring)
- Plugin-Overview
- Plugin-Catalog
- Plugin-Install
- Plugin-Licensing
- Plugin-Architecture
- Plugin-Dev-Guide
- Plugin-Migrations-Contract
Free (25)
- plugin-backup
- plugin-content-acquisition
- plugin-content-progress
- plugin-cron
- plugin-donorbox
- plugin-feature-flags
- plugin-github
- plugin-github-runner
- plugin-invitations
- plugin-jobs
- plugin-link-preview
- plugin-mdns
- plugin-mlflow
- plugin-monitoring
- plugin-notifications
- plugin-notify
- plugin-paypal
- plugin-search
- plugin-shopify
- plugin-stripe
- plugin-subtitle-manager
- plugin-tokens
- plugin-torrent-manager
- plugin-vpn
- plugin-webhooks
Pro (62)
- plugin-access-controls
- plugin-activity-feed
- plugin-admin-api
- plugin-analytics
- plugin-auth
- plugin-bots
- plugin-browser
- plugin-calendar
- plugin-cdn
- plugin-chat
- plugin-claw
- plugin-claw-budget
- plugin-claw-news
- plugin-claw-web
- plugin-cloudflare
- plugin-cms
- plugin-compliance
- plugin-ddns
- plugin-devices
- plugin-documents
- plugin-entitlements
- plugin-file-processing
- plugin-game-metadata
- plugin-geocoding
- plugin-geolocation
- plugin-google
- plugin-home
- plugin-idme
- plugin-knowledge-base
- plugin-linkedin
- plugin-livekit
- plugin-media-processing
- plugin-meetings
- plugin-moderation
- plugin-mux
- plugin-object-storage
- plugin-observability
- plugin-photos
- plugin-podcast
- plugin-post
- plugin-realtime
- plugin-retro-gaming
- plugin-rom-discovery
- plugin-social
- plugin-sports
- plugin-support
- plugin-tmdb
- plugin-voice
- plugin-web3
- plugin-workflows
Planned (26)
plugin-auditplugin-blogplugin-checkoutplugin-commerceplugin-drmplugin-exportplugin-flowplugin-importplugin-ldapplugin-mailgunplugin-mediaplugin-oauth-providersplugin-pagesplugin-postmarkplugin-rate-limitplugin-reportsplugin-samlplugin-schedulerplugin-sendgridplugin-ssoplugin-subscriptionplugin-thumbplugin-transcoderplugin-twilioplugin-wafplugin-watermark
Guides
- Guide-Production-Deployment
- Guide-SSL-Setup
- Guide-Multi-Tenancy
- Guide-Security-Hardening
- Guide-Monitoring-Setup
- Guide-Backup-Restore
- Guide-Custom-Services
- Guide-Migration-from-v1
Architecture
- Architecture
- Architecture-Guardrails
- Service-Graph
- Compose-Generation
- Nginx-Generation
- Plugin-Architecture
Reference
Machine interface
-
JSON-Output,
--jsonenvelope -
Command-Registry,
nself help --json - Exit-Codes
- error-codes, Error Codes
-
Compat-V15,
NSELF_V15gate
Licensing
Security
Brand
Operations
- operations/release-cascade, Release Cascade
- operations/self-healing, Self-Healing Schema
- operations/redis-tuning, Redis Pool Tuning
- operations/meilisearch-warmup, MeiliSearch Warm-Up
- operations/jwt-rotation, JWT Key Rotation
- operations/windows-wsl2-setup, Windows / WSL2 Setup
- operations/gemini-oauth-reauth, Gemini OAuth Reauth
Contributing
Admin
- USER-ACTION-QUEUE, Pending Admin Actions
All commands (21)
- A: cmd-add · cmd-admin
- B: cmd-backup · cmd-build
- C: cmd-clean · cmd-config
- D: cmd-db · cmd-deploy · cmd-doctor
- E: cmd-exec
- I: cmd-init
- L: cmd-license · cmd-logs
- M: cmd-mcp
- R: cmd-remove · cmd-reset · cmd-restart
- S: cmd-start · cmd-status · cmd-stop
- U: cmd-update