backup postgres s3

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