How to upgrade redash to beta version 9.0?

Keywords: Re:dash - Google Cloud Platform - How to - Upgrade

Currently redash has 9.0 version beta which they say is stable. They have a bug in version 8 which seems to be solved in v9. I downloaded 9.0.0-beta.tar.gz from their github and tried to follow instructions from here:

However after step 1, I am getting the following error:

mv: cannot move '/opt/bitnami/apps/redash/htdocs' to '/opt/bitnami/apps/redash/htdocs.bak': Permission denied

Is there some simple way to upgrade redash to the newest available version?

Also, forgot to mention, I have SSL with Let's Encrypt

Hi @cetascript,

Thanks for using Bitnami. Can you try using sudo with the mv command? I think our guide can be wrong and you may need more permissions to run the first command

Hello @gongomgra,

Thank you for your reply. sudo seems to work, but I am still stuck, unable to get v9 beta tar. Here is what I did:

  1. sudo mv /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.bak
  2. sudo mkdir /opt/bitnami/apps/redash/htdocs
  3. sudo wget
  4. sudo tar -C /opt/bitnami/apps/redash/htdocs -xvf v9.0.0-beta.tar.g

and after I get the following:
tar: v9.0.0-beta.tar.gz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

What is the issue here? I also downloaded the v9 beta to my local machine and tried to do local path like sudo tar -C /opt/bitnami/apps/redash/htdocs -xvf C:/Users/user/Downloads/redash-v9.0.0-b

and still get the same issue: tar: Cannot connect to C: resolve failed

What is the problem here?

Hi @cetascript,

tar -C /opt/bitnami/apps/redash/htdocs -xvf C:/Users/user/Downloads/redash-v9.0.0-beta.tar.gz

The command above is trying to uncompress a tarball from your local machine into your remote machine, which's not possible. You will need to download the redash-v9.0.0-beta.tar.gz file on your remote server and then run the command using that file instead

And how do I do that?

I thought sudo wget downloads it to the remote server from github and sudo tar unpacks it to htdocs directory? See my initial code above...

Hi @cetascript,

sudo mv /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.bak
sudo mkdir /opt/bitnami/apps/redash/htdocs
sudo wget
sudo tar -C /opt/bitnami/apps/redash/htdocs -xvf v9.0.0-beta.tar.gz

The download URL seems to be wrong. Can you try the next command instead?


Ok, now everything is completely broken, did I lose all my redash data??
My server now returns:

Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

Here is what I did:

  1. sudo mv /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.bak
  2. sudo mkdir /opt/bitnami/apps/redash/htdocs
  3. sudo wget
  4. sudo tar -C /opt/bitnami/apps/redash/htdocs -xvf v9.0.0-beta.tar.gz

5.sudo cp /opt/bitnami/apps/redash/htdocs.bak/.env /opt/bitnami/apps/redash/htdocs
6. sudo cp -R /opt/bitnami/apps/redash/htdocs.bak/venv /opt/bitnami/apps/redash/htdocs
7. sudo diff /opt/bitnami/apps/redash/htdocs/migrations /opt/bitnami/apps/redash/htdocs.bak/migrations

and finally:

  1. sudo /opt/bitnami/ restart

Below is what I got, the server did not restart:

sudo /opt/bitnami/ restart
Syntax OK
/opt/bitnami/apache2/scripts/ : httpd stopped
/opt/bitnami/apps/redash/scripts/ : redash_gunicorn not running
/opt/bitnami/apps/redash/scripts/ : redash_celery_worker not running
/opt/bitnami/apps/redash/scripts/ : redash_celery_scheduled not running
/opt/bitnami/redis/scripts/ : redis stopped
waiting for server to shut down.... done
server stopped
/opt/bitnami/postgresql/scripts/ : postgresql stopped
waiting for server to start.... done
server started
/opt/bitnami/postgresql/scripts/ : postgresql started at port 5432
/opt/bitnami/redis/scripts/ : redis started at port 6379
/opt/bitnami/apps/redash/scripts/ : redash_gunicorn could not be started
/opt/bitnami/apps/redash/scripts/ : redash_celery_worker could not be started
/opt/bitnami/apps/redash/scripts/ : redash_celery_scheduled could not be started
Syntax OK
/opt/bitnami/apache2/scripts/ : httpd started at port 80

Please help!! Redash is gone completely now!!

Oh, God, I broke everyhing now, I cannot even find support tool....please help!!!

sudo: /opt/bitnami/bnsupport-tool: command not found

Now if I run
sudo mv /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.bak

I get

mv: cannot stat '/opt/bitnami/apps/redash/htdocs': No such file or directory

Please tell me I did not lose everything I had on my redash server, I had very important custom queries in redash there. Why is it so hard to do a simple redash upgrade with bitnami??? Upgrades are a routine thing, did I make a huge mistake by using bitnami for redash? I am in complete panic now...Could this mess be because I had Let's Encrypt for my redash server? But your instruction had no warnings about that and I followed the instructions...

At this point I just need to restore my old dashboard, this is just a complete nightmare, I had no idea I will lose everything like that. You need to post some sort of warnings for people. Apparently redash says that your instructions are wrong for updates (people struggled with updates before):

There are several issues in their instructions:

The tarball on GitHub is the wrong tarball to download, as it doesn’t have the compiled frontend assets.
It includes wrong instructions on how to run migrations.
Extracting new tarball on top of the old files is a bad idea, as leftover files from the previous version can cause issues.
None of this explain the issue you’re having, but I recommend using the images we provide if possible. If not, I would examine the contents of the requirements.txt file.

Hi @cetascript,

Please note upgrading Redash requires additional steps apart from replacing the source code files. We have it documented on our docs, can you check it?

Also, notice in our guide using sudo is not needed during the upgrade process. Our docs may be wrong, but did you modify any permissions on your server?

I followed your instructions on upgrade, and now my server is down and everything is broken. I need help to sort it out. The document you linked is the one I followed for the upgrade. Are you going to leave me like that high and dry with broken redash and the complete loss of everything I had there???

Plus, it was you who recommended to use sudo!!!

Hi @cetascript,

I'm sorry for the inconveniences you are facing. I suggested using sudo thinking you may have changed any filesystem permissions that may be doing our guide not to work. Is that your case? Can you restore the old htdocs folder (getting back to previous Redash version), and start again without sudo? Note that replacing the source code files is not the only needed step.

Can you start a new fresh server and run the upgrade commands there? Once it is working, you can run them in your production server.

Ok, but how do I restore it?

I followed the instructions and saved the backup:

sudo mv /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.bak

But when I connect to the server via SSH, there is nothing there, it says no file or folder?

Hi @cetascript,

Then you can copy the htdocs.bak folder to a new htdocs running the next commands (note I'm first saving a copy of the current htdocs folder with the 9.0.0-beta files)

# Copy current htdocs into htdocs.9.0.0-beta
cp -R /opt/bitnami/apps/redash/htdocs /opt/bitnami/apps/redash/htdocs.9.0.0-beta

# Remove current htdocs
rm -rf /opt/bitnami/apps/redash/htdocs

# Restore previous htdocs (original)
cp -R /opt/bitnami/apps/redash/htdocs.bak /opt/bitnami/apps/redash/htdocs

Remember we highly recommend you to run these steps on a fresh new server where it is safe to make a mistake without losing any important file. Note if you delete the backup by mistake, you won't be able to recover them unless you have any backup (from AWS snapshot or any other way).

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.