Duplicate database model to customers for my mobile app

hi,
I am currently developing a mobile app linked with Baserow. This will be deployed to customers either on a self hosted via Docker, either on a hosted on baserow.io, on customer’s choice.

My app needs a precise list of tables and columns to run : so I have a base model, without the data.

My concern is how to prepare and duplicate the database model to customer’s installation easily in both cases ?
Thank you !

1 Like

may be that not simple to explain here ?
For the docker part , may be work on Overview , that is that I am on.
but what about the hosted part please ?

Hello @Productivix, I’ll ping someone from our devs to check your issue, meanwhile please make sure your request has all the needed details. Thanks!

hi,
I reformulate without options :
I am currently developing a mobile app linked with Baserow. This will be deployed to customers hosted on baserow.io.

My app needs a precise list of tables and columns to run : so I have made a base model, without the data.

My concern is how to prepare and duplicate the database model to customer’s installation easily ?

Thank you !

Hi @Productivix, I’d love to learn a bit more about your use-case before I can give good advice. Is each customer going to share the same database and tables, or do you intend to copy the entire database for every customer?

If you’re going with the single customer per database solution, and it’s okay if the database if in the same workspace (former group), then you can use the application/database duplication feature. If you plan on doing this via the API, you can use this endpoint https://api.staging.baserow.io/api/redoc/#tag/Applications/operation/duplicate_application_async. Via the interface it works like this:

hi, thank you for your answer.
but I want that the customers take their own login and pay directly to you for the features they want , on my advice. So they are not in my account, so I cannot use the duplicate command.
I want to deliver them an empty database with the good tables and columns numbers/names to ease me the interface parametrization .

There is a way of doing that, but unfortunately not yet on baserow.io.

If you were using baserow.io, you can only duplicate tables and databases within the same workspace. There is an issue on the backlog (Move databases/application to another group (#1359) · Issues · Bram Wiepjes / baserow · GitLab) that introduces the functionality to move/transfer a database to another workspace. When this is finished, you can duplicate the database and then move it to the workspace of your customer.

If you’re using the self-hosted version, you can use the structured export/import to move databases between workspaces. The downside is that this is only available using the CLI. You can, for example, export all the databases to a JSON + ZIP file. The JSON file contains the structure of the database, and the ZIP file contains the uploaded user files. This can then be imported in another workspace. You need to be comfortable with the CLI, though:

python src/baserow/manage.py export_workspace_applications FROM_WORKSPACE_ID --indent
python src/baserow/manage.py import_workspace_applications TO_WORKSPACE_ID workspace_FROM_WORKSPACE_ID

There is another issue on the backlog (Offline backups (#90) · Issues · Bram Wiepjes / baserow · GitLab) for making this type of export/import possible via the web-frontend interface. This would basically allow you to make an export of a workspace or database by clicking a button, and import this into another Baserow environment.

Another approach you could take is completely self-hosting Baserow and creating your own template, that your customers can install. This does require some technical knowledge on building and deploying Baserow yourself. More information about creating templates can be found here: Create a template // Baserow.

I hope this answers your question :slight_smile:

Hi Bram,
thanks for so much info, but … I want to focus on hosted config by you.
I did not understand the issue 1359 (poor description).

Can you please, in this case, describe me or give me the link how to duplicate a database from one user (or “group” ?) to another independent user ? precisely please. It is urgent now.
thanks

I have my own account , my customer (that will be yours also after) has his own account and I want to send him (by email or any file deposit as on my Google Drive) a file with my database template so that he can integrate it in his account. Simple at 1st sight, but how ?

still in “hosted” case,
I can see the only command available on the database: “backups” ,
but we cannot export it !

so there is noway for a hosted customer to recover its data !!!
I STOP the project until there is a function to recover our data