Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ Redash for redundancy. You will also need to tweak the number of workers based o

See [Upgrade Guide](https://redash.io/help/open-source/admin-guide/how-to-upgrade).

### How do I backup my PostgreSQL database?

```
# docker compose -f /opt/redash/compose.yaml exec -T postgres pg_dumpall -U postgres > backup-$(date +%Y%m%d).sql
```

### How do I upgrade PostgreSQL to a newer major version?

If you are running PostgreSQL 17 or earlier and want to upgrade to PostgreSQL 18, you need to update the volume mount
path in your `/opt/redash/compose.yaml`. See the
[pgautoupgrade documentation](https://github.com/pgautoupgrade/docker-pgautoupgrade#error-message-when-mounting-data-to-varlibpostgresqldata-on-postgres-v18)
for details.

### How do I use `setup.sh` on a different operating system?

You will need to create a docker installation function that suits your operating system, and maybe other functions as
Expand Down
20 changes: 14 additions & 6 deletions data/compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,22 @@ services:
image: redis:7-alpine
restart: unless-stopped
postgres:
# [IMPORTANT]
# We intentionally fix the version to v17 to avoid automatic upgrade to v18 (or later).
# If you want to upgrade to v18, please refer to the official upgrade guide:
# https://github.com/pgautoupgrade/docker-pgautoupgrade#one-shot-mode
image: pgautoupgrade/pgautoupgrade:17-alpine
# pgautoupgrade can perform PostgreSQL major version upgrades when you update this image tag to a newer major version.
#
# [NOTE FOR EXISTING USERS]
# If upgrading from PG17 or earlier, the volume mount path has changed.
# Backup your data first, then stop containers and update your volume from:
# /opt/redash/postgres-data:/var/lib/postgresql/data
# to:
# /opt/redash/postgres-data:/var/lib/postgresql
#
# pgautoupgrade will automatically migrate your data to the new directory structure.
#
# Details: https://github.com/pgautoupgrade/docker-pgautoupgrade#error-message-when-mounting-data-to-varlibpostgresqldata-on-postgres-v18
image: pgautoupgrade/pgautoupgrade:18-alpine
env_file: /opt/redash/env
volumes:
- /opt/redash/postgres-data:/var/lib/postgresql/data
- /opt/redash/postgres-data:/var/lib/postgresql
restart: unless-stopped
nginx:
image: redash/nginx:latest
Expand Down