Restore Retool Database

Hi All,

I accidentally deleted every data in every table by mistakenly running a script. I deleted the database on Wednesday, 16th of July UTC 11:00

Can the retool team, help me restore the database to a timepoint before it got wiped out?

prod base
https://timeworks.retool.com/
Monday, 14th of July, 13:25 UTC, or any other time before the deletion happened

Hi @dhia,

Hopefully, the Retool team can help you this time. @Darren, @Tess, @Jack_T . Can you do some magic? :mage:

In the future, if you need point-in-time restore, check out Neon. This is what the Retool database is based on. They have a free version which is easy to set up and comes with Point-in-time Restore of up to 24 hours. For $19/month you jump to 7 days.

1 Like

Hi @Shawn_Optipath thank you so much for the suggestion.
That tools is interesting and I will definitely try it once the database is restored

1 Like

Thanks for reaching out, @dhia! I've created a new read-only resource in your org called retool_db (production) recovery snapshot 2025-07-14T13:15:00Z that will expire on July 21, so make sure you pull the necessary data before then.

I recommend building a temporary app or workflow that can query this new resource and subsequently write back to your Retool DB. Let me know if you have any questions about the restoration process!

1 Like

@Darren Hi Darren, thanks for the help. But how do i connect to this new resource? or how do i pull the data from it? I dont see any hostname or connection string informations in it. Im sorry im a newbie.

You actually have a few different options, @Arie_Pranasakti! It's a little manual, but the simplest solution is to query each table individually and export the results as a CSV file.

Once you have the CSV, you can import the data back into your Retool DB.

@Darren I think i just made a mistake, i just reconfigured the 'Connection String' in that resource. Now, when i click on 'Test connection', it produces this error. Could you reconfigure this? Thank you!

I just created a new resource for you, @Arie_Pranasakti. It's called retool_db (production) recovery snapshot 2025-07-14T13:00:00Z.

@Darren Thank you so much! You're a life saver! However, there is only one problem. There is a table called "TemplateAnnotation", i cannot import this one because it's too large. Is there a way to increase a limit of this query?

@Darren I found 2 more tables that i cannot query because they exceed the maximum size of 100mb. So a total of 3 tabels:

  1. Build
  2. Download
  3. TemplateAnnotation

Please advice on how to proceed. Thank you!

@Arie_Pranasakti,

It sounds like you will likely need to use some form of pagination. If you know how to setup a workflow I would either use the loop block or a js code block and create a function to fetch x records and keep going to the end. Plenty of ways to do this in a workflow.

1 Like

@Shawn_Optipath Thank you Shawn!

1 Like

Agreed! You'll likely need to process the table data in several steps.

2 Likes

You could even further streamline the data recovery with Retool’s workflow tools:

  • Extract the schema from your snapshot and use those definitions to recreate tables in your target DB.

  • In a workflow, query the recovery snapshot resource directly and insert row-by-row or in bulk into the newly created tables—no need for CSV export/import.

Thank you @Darren for the snapshot and @Shawn_Optipath for the help!
Because you guys, @Arie_Pranasakti managed to get data tables back.

One more issues though! Turns out other data table data; the script also deleted all of our database configuration settings resulting in our clients unable to add new records.

Is there any way to recover this? Maybe there is some sort of logs/schema? Do you have suggestions?

Glad to hear it! I don't think we'll be able to recover any additional configuration, though. Is there something In particular that you're looking for? I'm not sure what might be restricting access to your users.

Let me know if you need any additional assistance, @Arie_Pranasakti and/or @dhia!