We’d like to archive our DB backups to long-term storage (render only keeps them around for a week). Is there a way to get programmatic access to the backups so we can download them?
What you could do is create a script to dump the database and then archive it. You can run pg_dump on your render databases anytime.
PGPASSWORD=<YOUR_DB_PASS> pg_dump \ -h postgres.render.com \ -U <YOUR_DB_USER> \ --format=custom --no-acl --no-owner \ <YOUR_DB_NAME> > <YOUR_DUMP_NAME>.dump
Here is a script you can modify to help you with this:
We don’t have this yet, but do plan to support a public api endpoint that would provide your desired functionality. The current plan is for the API to return the same download links we use in the dashboard.
For the short term, @jclarke’s suggestion might help you get started.