Backups and recovery
Back up, move, and recover indexd
PostgreSQL contains the operational state of an indexd installation. A tested database backup is the primary way to recover or move the service without losing accounts, contracts, settings, and maintenance state.
The indexd recovery phrase is not a backup of the indexer. It can recover the on-chain wallet balance after a blockchain rescan, but it cannot recreate the object index, contracts, or application accounts.
Back up PostgreSQL
Use normal production PostgreSQL practices:
Run scheduled automated backups; use WAL archiving and point-in-time recovery for larger or critical deployments.
Keep backups outside the
indexdmachine and storage volume.Test restores regularly and monitor backup failures, database health, disk space, and WAL retention.
Use a dedicated database and role. Use verified TLS when connecting over an untrusted network.
Back up
indexd.ymland the data directory, and store the wallet recovery phrase separately.
For Docker Compose, use PostgreSQL-aware tooling such as pg_dump, a managed-service snapshot, or a physical base backup. Copying a live postgres volume is not an application-consistent backup.
Do not share a database
Only one full indexd daemon may use a PostgreSQL database at a time. Multiple daemons are not supported or safe: indexd has no database-wide leader election, and each instance runs its own consensus, wallet, contract, and maintenance services.
Use active/passive failover and ensure the old process is stopped before starting its replacement. The indexd remote migration worker is different: it has no database connection and only performs work assigned by the primary node.
What can be recovered
PostgreSQL
Server-side state, including application accounts and connect keys, contracts, object and slab records, sector locations, settings, and wallet scan state.
indexd wallet recovery phrase
The wallet identity and on-chain balance after a rescan. It does not recover the index.
Application recovery phrase and a surviving indexer
After normal reauthorization, the app can rebuild its local state from the object metadata it stored on that indexer.
A complete application metadata cache
The app can pin its objects to a replacement indexer without moving the object payload. The cache must contain the object keys and complete slab layouts, not only object IDs.
If both the application cache and the indexer's PostgreSQL state are lost, neither recovery phrase can reconstruct the missing object metadata.
Move or restore indexd
Restore from a database backup
Stop
indexdbefore the final backup.Back up PostgreSQL and copy the
indexddata directory, includingindexd.ymlandconsensus.db.Restore both on the replacement server, configure the same wallet recovery phrase, and initially use the same
indexdversion.Start exactly one
indexdinstance and wait for consensus and wallet synchronization.Verify the wallet balance, contracts, application accounts, connect keys, and object health before switching applications or upgrading.
If the public application API URL stays the same, existing applications can continue using their saved credentials after traffic moves to the replacement.
Recover from an application's local cache
This is a last-resort fallback when PostgreSQL is permanently lost, not a substitute for database backups:
Preserve the application's local metadata cache. Do not sign out, clear its storage, or reinstall it.
Set up, synchronize, and fund a replacement
indexdso it can form contracts.Create a connect key on the replacement and connect the application normally. The lost indexer is not required.
Have the application pin its cached object and slab metadata to the replacement. The replacement can pin the sectors already held by storage providers under its contracts; the object payload does not need to be uploaded again.
Wait for pinning and contract maintenance to finish, then verify the object list, health, and test downloads before deleting any recovery state.
Moving even a large metadata catalog is far cheaper than downloading and re-uploading. Start promptly after a loss, because the old indexer is no longer renewing contracts or repairing redundancy. Only objects present in the local cache can be recovered this way.
Last updated
Was this helpful?