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