Seeding data
Seed your workspaces with data from production dumps, live databases, or S3 backups — at service setup time or any time after.
Seed sources
Section titled “Seed sources”| Source | Form | Notes |
|---|---|---|
| PostgreSQL URL | postgresql://user:pass@host:5432/db | live pg_dump from a running server |
| Local file | ./dump.sql, ./backup.dump | .sql via psql, other extensions via pg_restore (custom format) |
| S3 object | s3://bucket/path/dump.sql | credentials/region from standard AWS env vars |
Seeding at service setup
Section titled “Seeding at service setup”devflow service add app-db --provider local --service-type postgres --from ./backup.sqldevflow service add app-db --provider local --service-type postgres \ --from postgresql://readonly:pass@replica:5432/mydbdevflow service add app-db --provider local --service-type postgres \ --from s3://my-bucket/backups/latest.dumpSeeding an existing workspace
Section titled “Seeding an existing workspace”devflow service seed main --from dump.sqldevflow service seed feature/auth --from postgresql://readonly:pass@replica:5432/mydbdevflow service seed main --from s3://my-bucket/backups/latest.dumpdevflow service seed main -s app-db --from dump.sql # specific serviceHow it works
Section titled “How it works”From a PostgreSQL URL — devflow runs pg_dump in an ephemeral Docker container against the source, downloads the dump to a temp file, and restores it into the target container with pg_restore. localhost URLs are rewritten to host.docker.internal automatically so the dump container can reach databases running on your host.
From a local file — .sql is piped through psql; any other extension is treated as custom format and restored with pg_restore.
From S3 — the object is downloaded using standard AWS credentials (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_DEFAULT_REGION/AWS_REGION), then restored like a local file.
Resetting instead of re-seeding
Section titled “Resetting instead of re-seeding”For “give me a clean copy of the parent again”, prefer:
devflow service reset feature/authIt re-clones from the parent state — faster than re-restoring a dump, and exactly what agent retry loops want.