supabase / postgres-meta

A RESTful API for managing your Postgres. Fetch tables, add roles, and run queries
https://supabase.com
Apache License 2.0
941 stars 126 forks source link

Feature request: Add dump and restore endpoints to support primitive backups #495

Closed ruggi99 closed 1 year ago

ruggi99 commented 1 year ago

Chore

Describe the chore

Feature request: Add dump and restore endpoints to backup and restore database. Useful for self-hosting, given that Supabase Backup is not available. Maybe useful for users not using Supabase. Also can be used in Supabase Free Tier.

Initial thoughts:

Additional context

To be discussed if dump and restore are in scope with the scope of this package (personally I think they are)

soedirgo commented 1 year ago

I think this is a bit out of scope - while backup & restore are part of managing Postgres (which is what pg-meta aims to do), pg-meta's interface is not sufficient to do the job effectively. Imagine e.g. having a 1GB database, and downloading the dump as a multi-gb JSON blob in one HTTP request. Not good.

A dedicated tool is better served for this, e.g. using the pg_* tools directly or mounting the data directory in a separate volume.