Redash maintenance and Backup

Hello Everyone,
Greetings for the day!! Hope you all doing great today!

We have been using redash since couple of months. All of sudden last month redash went off due to an error message “No space left on device” results in corrupted Hard disk. Somehow after working with AWS support we could get back all the data and instances successfully back. Now we would like to periodic maintenance and backup on queries.

In some post I saw that all the queries that we fire at redash are stored in a table called queries. But I couldn’t find such table. Could someone help us in performing extra level of query backup on weekly basis to make sure the impact is very less in the event of failure?

Appreciate your time help!

It’s easiest to do this with the API. Our documentation includes a script for exporting all your queries as files. Or if you wanted a simple JSON backup it’s even easier using the redash-toolbelt library:

from redash_toolbelt import Redash
import json

url = "your redash instance url"
key = "your api key"
path_to_file = "path to your file system for back-up"

client = Redash(url, key)

with open(path_to_file 'w') as fp:
    queries = client.paginate(client.queries)

Thank you so much Susidapop for your immediate response. I’m trying to perform the steps as per the document. Will get back to you if something pops up!

1 Like