cloudflare R2 postgres backups with cron
islambelabbes
TRIALOP

2 years ago

hey , i have found this great template
https://github.com/railwayapp-templates/postgres-s3-backups

it looks like it does the job , but i would like to know if there is any version of this template that uses railway built in corn job

so it will run the server based on some corn ( 7days or so )

13 Replies

islambelabbes
TRIALOP

2 years ago

N/A


2 years ago

that template actually does have support for railway's native cron, simply enable your desired cron expression in the service settings, then set a SINGLE_SHOT_MODE service variable to true this will cause the app to instantly start the backend when ran and then exit when it's done it's backup allowing you to use it with railways native cron!


islambelabbes
TRIALOP

2 years ago

great stuff! , thank you


2 years ago

let me know if it works for you!


islambelabbes
TRIALOP

2 years ago

hey @Brody

1 - for the region should i enter WEUR for : Western Europe (WEUR)
2 - for the endpoint should i enter the S3 API when using r2 ?

1242491920219902000


islambelabbes
TRIALOP

2 years ago

thats what i understand


2 years ago

for the region you should use auto and for the endpoint, you use the endpoint that cloudflare gave you


islambelabbes
TRIALOP

2 years ago

should i sleep for the prv db ?

1242494080320278500


2 years ago

no, it handles that itself


2 years ago

it uses pg_isready instead


islambelabbes
TRIALOP

2 years ago

works great with no effort !
thanks brody


2 years ago

awesome!


2 years ago

I'll update those variable descriptions to include info on what to use if using cloudflare r2


Loading...