You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bot stores some data in postgres, so we need to think about backups.
Right now it's running on a free Heroku "hobby-dev" account, which means that Heroku keeps some kind of WAL logs but AFAICT doesn't offer any way to access them (??), and also Heroku will keep one week of daily backups for us if we enable it (which I have).
This isn't too bad. I'm a bit uncomfortable with the idea that heroku is a single-point-of-failure, but honestly they're probably more reliable than anything a shoestring volunteer project like ours could do. But it wouldn't hurt to stick a cron-job somewhere that fetches the backups offsite, just in case.
The text was updated successfully, but these errors were encountered:
That looks like a pretty easy way to get the backup out of the Heroku system. Some open questions are what we will use as the scheduler and where the scheduler will be executing, as well as where will we be saving the backups.
The first architecture that I thought of is something like this:
Suppose we could schedule the backup via cron or something like it on Heroku.
Once per day this job sends a POST request, which includes the backup URL from Heroku, to a backup service that we maintain somewhere.
The backup service could be a quartz app expecting a request like so:
POST /api/backups?backup_url_from_heroku=<>
Headers:
Authorization: Bearer <a-secret-for-the-backup-service>
Then the backup service could do whatever it needs to do with the backup.
However this is a lot of extra stuff, and maybe too much for our case. Perhaps the simpler approach would be to use an AWS service like S3 to store the backups. In which case we can probably just schedule a daily job on the Heroku setup, that POSTs the backup to S3 using an API client.
The bot stores some data in postgres, so we need to think about backups.
Right now it's running on a free Heroku "hobby-dev" account, which means that Heroku keeps some kind of WAL logs but AFAICT doesn't offer any way to access them (??), and also Heroku will keep one week of daily backups for us if we enable it (which I have).
This isn't too bad. I'm a bit uncomfortable with the idea that heroku is a single-point-of-failure, but honestly they're probably more reliable than anything a shoestring volunteer project like ours could do. But it wouldn't hurt to stick a cron-job somewhere that fetches the backups offsite, just in case.
The text was updated successfully, but these errors were encountered: