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