Any way to backup a database to local automatically with API?

I am looking for a way to automatically backup baserow database via API. But the problems are:

  1. Not self-hosted. So cannot directly backup the underlying PostgreSQL database.
  2. Can create snapshots with API, but cannot download them to local machine.
  3. Can export tables as csv file one by one with API, but inconvenient if database contains a lot of tables

Is there a simple API call to download all tables with data from a database?

Hi @coolmoon,

You can export data from the workspace dropdown (Workspace home - context menu on the workspace name) by selecting “Export data”. That will create a downloadable export of the workspace. However please consider that if you are using Baserow.io you will not be able to import it back at the moment.

Since you were asking about the API, this is the endpoint: https://api.baserow.io/api/redoc/#tag/Workspaces/operation/export_workspace_applications_async.

So the exported data in that way can only be imported back to a self-hosted baserow instance, but not the baserow.io hosted workspace?

So the exported data in that way can only be imported back to a self-hosted baserow instance, but not the baserow.io hosted workspace?

Yes, exactly.

So the “import” function on baserow.io is only for importing workspace from self-hosted instances? Any plan to directly support importing from baserow.io exports in the future?

How about self-hosted instances, can they export/import from themselves or between each other?

Baserow can both export and import and you will be allowed to do that with self-hosted Baserow without any issue. We are just being careful for the time being with any imports done in baserow.io for data integrity and security reasons. It is planned to be supported too but the import logic will need to be made more robust before we allow that.