logoalt Hacker News

delbronskitoday at 4:14 PM1 replyview on HN

How does one go about deployment and backups with a local db? Like let’s say I have a web app hosted on a cloud service like App Engine or Elastic… if I redeploy my web app how do I make sure my current local db does not get get wiped? How are periodic backups handled?

I can think of many hacks to do this, but is there a best practice for this kind of stuff? I’m curious how people do this.


Replies

dtkavtoday at 4:25 PM

sqlite+litestream [1] is fantastic, i highly recommend it.

I use it with pocketbase and it is a delightful and very productive setup.

This guide [2] is for an older version of pocketbase and litestream, but i can update it if would be helpful/interesting for anyone.

[1] https://github.com/benbjohnson/litestream/

[2] https://notes.danielgk.com/Pocketbase/Pocketbase+on+Fly.io

show 1 reply