cloudflare R2 postgres backups with cron
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 )
GitHub
GitHub - railwayapp-templates/postgres-s3-backups: A simple Node ap...
A simple Node app to automatically backup PostgreSQL databases to an S3 bucket - railwayapp-templates/postgres-s3-backups
Solution:Jump to solution
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!11 Replies
Project ID:
N/A
N/A
Solution
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!great stuff! , thank you
let me know if it works for you!
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 ?
thats what i understand
for the region you should use
auto
and for the endpoint, you use the endpoint that cloudflare gave youshould i sleep for the prv db ?
no, it handles that itself
it uses
pg_isready
insteadworks great with no effort !
thanks brody
awesome!
I'll update those variable descriptions to include info on what to use if using cloudflare r2