How to do PostgreSQL point in time recovery

I'm in the process of testing PostgreSQL point in time recovery and need to add/edit the recovery.conf file in pgdata. How can I access pgdata to do this and does anyone have advice for point in time recovery for a PostgreSQL instance hosted on Railway? Thanks
6 Replies
Percy
Percy12mo ago
Project ID: 495180ac-2905-4ac4-b88c-e03e70a3298e
jdmedlock
jdmedlockOP12mo ago
Project ID: 495180ac-2905-4ac4-b88c-e03e70a3298e
Brody
Brody12mo ago
railway doesn't provide any kind of container file access or a native way to copy in files like your own recovery.conf into to pre built images. for this you would want to have a repo with a Dockerfile and your recovery.conf file with the Dockerfile looking something like this
FROM <the postgres image railway uses>

COPY recovery.conf <the location that this file should be copied to>
FROM <the postgres image railway uses>

COPY recovery.conf <the location that this file should be copied to>
then swap the source of the database from the docker image to your repo
jdmedlock
jdmedlockOP12mo ago
Thank you. This is the advice I needed
Brody
Brody12mo ago
no problem!
Pepijn
Pepijn5mo ago
@jdmedlock were you able to make point in time recovery work?
Want results from more Discord servers?
Add your server