Our database service, Postgres, comes installed, by default, with OpenReplay and runs in a dedicated container on your instance for a lower cost of deployment. If you’re looking for greater scalability or easier operations, you can still use an external Postgres (i.e. AWS RDS or GCP Cloud SQL).
Export existing schema and dataSection titled Export existing schema and data
Note: If you’re starting fresh and haven’t yet installed OpenReplay, then simply proceed with the setup and ignore the following steps.
The local schema and recorded data must now be exported to the external Postgres:
- First, backup the local database:
kubectl exec -n db postgresql-postgresql-0 -- bash -c 'PGPASSWORD=<postgresPassword from vars.yaml> pg_dumpall -U postgres '" > ~/path/to/dump.sql
- Install the Postgres client on your OpenReplay instance and ensure it has access to the external database:
sudo apt install postgresql-client
- Restore the backup into the new externalPostgres:
PGPASSWORD=PG_PASSWORD psql -U PG_USERNAME -h [RDS_URL} -d postgres < /path/to/dump.sql
- Finally, update all
openreplay -eand point them towards the external database:
postgresqlPassword: "changeMePassword" postgresqlHost: "postgresql.db.svc.cluster.local" postgresqlPort: "5432" postgresqlUser: "postgres" postgresqlDatabase: "postgres"
- Save and quit using
:wqfor the changes to take effect
Have questions?Section titled Have questions?
If you encounter any issues, please connect to our Slack and get help from our community.