Issue Summary

I have a self hosted Redash Instance on AWS EC2 (AMI Image) and am able to dump and restore some parts of Redash. Right now I am able to log in on the restored instance and see my queries listed. But I am not able to load the query (after clicking on the link)

I did the following:

on the source instance:

docker exec -t redash_postgres_1 pg_dump -c -U postgres > ~/redash_backup.sql
aws s3 cp ~/redash_backup.sql s3://my-backup-bucket/

on the target instance:

I altered the REDASH_SECRET_KEY in /opt/redash/env to the one of the source instance

aws s3 cp s3://my-backup-bucket/redash_backup.sql ~/redash_backup.sql
cat ~/redash_backup.sql | docker exec -i redash_postgres_1 psql -U postgres
docker-compose restart

So my question is how can I fully backup and restore Redash completely so that I can continue working seamlessly?

Technical details:

  • Redash Version: redash:8.0.0.b32245
  • Browser/OS: Ubuntu 18.04.3 LTS
  • How did you install Redash: docker-compose (AMI Image), see setup#aws

The postgres database contains the entire application state. So copying this to a new instance should be all that is required.

Are you certain that the new instance of Redash is the same exact version as the one you copied? Did you set REDASH_SECRET_KEY before spinning up the new instance for the first time?

Thanks for your response. Yes the versions are equal. I use the AMI Image and the EC2 starts Redash before I change the REDASH_SECRET_KEY. Unfortunately I cannot find an Env in the docs to overwrite the key during setup.

If you’re running Redash entirely on an EC2 instance (i.e. including the database), you could also just create an AMI of the instance as a backup. Restoring just requires spinning up a new instance from the image.

Yes, I solved it that way. Right now I have a AWS Backup Plan in place that creates a new snapshot every night. With this solution the the ESB Volume is snapshotted as well. Thanks for you support!

1 Like

Thanks for following up with that confirmation!

The solution requires user to be restoring from the same platform. I was able to backup from one cloud platform, and restore on another. I posted the solution on a related issue:

1 Like