backup postgres s3
how to correctly connect postgres backup to s3?
32 Replies
Project ID:
N/A
Is this error after deploy due to the wrong database credential?
/run/postgresql:5432 - no response
Solution
I'd deploy this template and pair it with Cloudflare R2
https://railway.app/template/I4zGrH
make sure it's deployed into the project with the postgres database so that you can use the private database url
ok, I'll switch to R2
in the database env I set it to get it automatically
${{ DATABASE_URL }}
you'd need to use a namespace in that reference
Does cloudflare r2 have no plan without adding credit card?
it requires you to add a credit card
ok, where do I get the cloudflare credentials?
you have to generate them through cloudflare's website
BACKUP_DATABASE_URL is
${{ Postgres.DATABASE_PRIVATE_URL }}
?assuming your database is in the same project and named
Postgres
that is correctthe database is in the same project
deploy logs
/run/postgresql:5432 - no response
click the eye icon on the backup URL variable, does it show correctly?
yes
private or public url?
I will copy and paste
do not copy and paste please
ok
it imported correctly
are you sure the backup url service variable on the CRON service shows correctly when you click it's eye icon
yes
If I send the project code within the railway, would it be better for you to follow it?
I don't work for Railway, I can't view your project
can you provide some context on this screenshot please?
I got the env from the database and got the env from postgres backup and compared
just to confirm if it was identical
screenshot of your deployment logs please
screenshot of the project please
It's all in the same project
hmmm so why are you getting that error, very strange, I will test this myself when I'm back at the computer and get back to you
ok
i can not reproduce this issue unless i setup my
BACKUP_DATABASE_URL
variable incorrectly