Databases and backups
Fix database connections, startup, backups, restores, and encryption problems.
An app cannot reach its database
| Check | Why |
|---|---|
| Same server and same Environment? | Only then the app gets the private address. Otherwise the database needs Expose publicly |
DATABASE_URL comes from db-main, which runs on another server and is not publicly reachable | The deploy refuses it. Move one next to the other, or turn on Expose publicly |
| Is the variable connected? | A connected variable picks up a new password or address at every deploy; a hand-typed one does not. Use Connect app on the database's Connected apps card |
| Is the database running? | Its status badge |
| Redeployed after setting the variable? | Variables apply on the next deploy |
A database does not start
Database is still provisioning - wait for it to finish before redeploying it.: wait.- Error right after creating it: the alert
Database db-main could not be set upsays why. - After a version change: a new major version may reject the old data directory. Dump, rebuild, restore.
- After a custom command on Redis: keep
--requirepass, or password auth is off. - After a server move:
Moved db-main's data to edge-2, but its stack did not start there. Redeploy the database. A failed copy rolls the move back and leaves it on its original server.
A Rebuild removed the data
Rebuild deletes the volume and provisions a fresh database; the connection string still works. Use Redeploy for a change that keeps the data, and restore a backup if data is missing.
Deleting a database is refused
db-main was NOT deleted: the host did not confirm that both the container and the volume are
gone. Try again once the server is back. If the host is never coming back, Delete anyway
removes it from Deplo and keeps retrying the teardown on that host.
A backup destination test fails
Connection log in the destination's menu shows the failed step and the equivalent commands.
| Error | Usual cause |
|---|---|
write probe to bucket "backups" | The key is read-only. The test writes an empty object on purpose |
reach bucket "backups" | Wrong endpoint or region |
bucket "backups" does not exist (or the credentials cannot see it) | Wrong bucket name, or a key scoped to another bucket |
| A folder fails to resolve | The path does not exist on that server, or the agent cannot write there |
| Anything on a private address | Refused unless an instance admin ticks This bucket is on my own network |
A backup run fails
- No space on the destination server.
- The workload is not running. Backups read from the live target.
This server is offline.: it lost its connection to Deplo during the run. Bring it back online, then run the backup again.
The app's data was not in the backup
An app's schedule does not include its databases. Schedule the databases too.
A restore fails
this backup is not the one Deplo wrote: the artifact changed since the backup ran.- Wrong encryption key: use Restore from file and paste the destination's recovery key.
- Confirmation refused: type the target's name exactly. A restore is destructive.
A backup artifact will not decrypt
Artifacts use age, one key pair per destination. Take Download recovery key from the
destination's menu and store it outside Deplo: without the control plane it is the only way in.
age -d -i deplo-recovery-key.txt backup.tar.gz.age > backup.tar.gzOld backups are disappearing
Keep is a count, not days. Keep 7 keeps the seven most recent backups; older ones are removed
after each successful run.
Next steps
Did this page help you?