I have a Postgres DB backup for Redash 4.0.1 and I tried ingesting this data to the new Redash 5.0.1 setup (docker version) but it is failing to load most of the data (i.e dashboards, queries, etc). I manually connected to the Postgres DB and can see that users data is copied but not others. What is the issue here?
Note: The v4 and v5 are on different machines, currently v4 holds the production data

It’s not clear from your post which process isn’t going as expected. If you dump the v4 database and then load it on a new machine, that’s handled by postgres. It has nothing to do with Redash. So if it fails I’m not sure how we can help.

I do see one issue with what you described though: v4 and v5 have different database schemas (this is true across all versions of Redash - each version applies new migrations to support new features / deprecations). The “right” way to do this is to dump your v4 database, load Redash v4 on your new machine. Load the v4 database on the new machine. And then upgrade the entire instance to v5 in place. During the upgrade process the v5 migrations will be applied. But you will still have your production v4 instance unsullied if something goes wrong during the upgrade.

Thanks, @k4s1m. I was trying the second approach under the assumption that v4 and v5 don’t have any schema changes.

Now I tried to setup v4.0.1 (fresh installation) using docker-compose but it is failing at python dependency installation. PFB, the error

Collecting idna>=2.1 (from cryptography==2.0.2->-r requirements.txt (line 46))
  Downloading https://files.pythonhosted.org/packages/9f/24/1444ee2c9aee531783c031072a273182109c6800320868ab87675d147a05/idna-3.1.tar.gz (181kB)
    Complete output from command python setup.py egg_info:
    Sorry, Python 3.4 or newer required

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-hbLPtX/idna/
You are using pip version 8.1.1, however version 21.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
ERROR: Service 'server' failed to build: The command '/bin/sh -c pip install -r requirements.txt -r requirements_dev.txt -r requirements_all_ds.txt' r
eturned a non-zero code: 1

Update: the above issue was happening for the development docker file, when I used the production docker file, the setup was successful but Redash was responding with 500 Internal Server Error. Here are the logs:

ProgrammingError: (psycopg2.ProgrammingError) relation "organizations" does not exist
LINE 2: FROM organizations
             ^
 [SQL: 'SELECT organizations.updated_at AS organizations_updated_at, organizations.created_at AS organizations_created_at, organizations.id AS organiz
ations_id, organizations.name AS organizations_name, organizations.slug AS organizations_slug, organizations.settings AS organizations_settings \nFROM
 organizations \nWHERE organizations.slug = %(slug_1)s \n LIMIT %(param_1)s'] [parameters: {'slug_1': 'default', 'param_1': 1}] (Background on this er
ror at: http://sqlalche.me/e/f405) 
[2021-01-31 09:23:17,812][PID:15][INFO][metrics] method=GET path=/login endpoint=redash_login status=500 content_type=? content_length=-1 duration=3.5
1 query_count=0 query_duration=0.00
[2021-01-31 09:23:18,336][PID:14][INFO][metrics] method=GET path=/favicon.ico endpoint=redash_index status=302 content_type=text/html; charset=utf-8 c
ontent_length=311 duration=0.61 query_count=0 query_duration=0.00
[2021-01-31 09:23:18,580] ERROR in app: Exception on /login [GET]

Note: I have not yet ingested the backed up data, the fresh setup itself is failing.

Sorry, as there was no setup file for v4 docker version I’ve not set it up properly. I’ve made some changes to the existing setup script and was able to install it properly.

Thanks