4 ms·
I went through this presentation looking for "how do you do backups" and it glosses over it. But the author blogged about that separately [1]. It seems he uses
by skybrian 3y ago
I went through this presentation looking for "how do you do backups" and it glosses over it. But the author blogged about that separately [1].
It seems he uses Litestream with DigitalOcean Spaces for this. Looks like they start at $5 per month for 250 GB [2]. Would that be the best way for a hobbyist to get started?
[1] https://fractaledmind.github.io/2023/09/09/enhancing-rails-sqlite-setting-up-litestream/ https://fractaledmind.github.io/2023/09/09/enhancing-rails-s...
[2] https://www.digitalocean.com/pricing/spaces-object-storage https://www.digitalocean.com/pricing/spaces-object-storage
- Glench 3y agoI use Litestream for my production web app and stream to Backblaze B2. It's S3 compatible and literally free!
- stpn 3y agoFwiw, I've been using hosted LiteFS Cloud[0] (written by the same person who wrote litestream) on fly.io. The pricing starts at $5/mo for the first 10GB (kind of steep) but it's been working out so far. (no affiliation to fly/litefs, just a fan) [0]: https://fly.io/blog/litefs-cloud/ https://fly.io/blog/litefs-cloud/
- begueradj 3y agoI checked your blog and I am impressed you are still very curious to learn things which didn't exist before you retired (generative AI).
- skybrian 3y agoThanks! Just tinkering, though. I skim AI papers sometimes, but don’t do the homework.
- yread 3y agoMaybe I'm crazy but I just have a cron job that does .backup during a time with little activity. My db is only 40GB or so and stored on an NVMe so it finishes quickly.
- hnben 3y agothis comments seems to say, that you could corrupt your copy, if you copy it while it is in use https://news.ycombinator.com/item?id=39838753 https://news.ycombinator.com/item?id=39838753
- simonw 3y agoThe ".backup" mechanism is safe - it's directly copying the file with "cp" that doesn't work. Here's how to use .backup: sqlite3 data.db ".backup 'backup.db'" You can also do this: sqlite3 data.db 'VACUUM INTO "backup.db";' That's slower, but results in a smaller backup file: https://www.sqlite.org/lang_vacuum.html https://www.sqlite.org/lang_vacuum.html
- hnben 3y agothanks!
- Nextgrid 3y agoNowadays you're considered crazy if you don't pay rent-seekers for every simple thing.
- gwd 3y agoFor my project I've been using Litestream to Cloudflare's R2, which is compatible with Amazon S3, and has a very generous free tier.
- skybrian 3y agoIt seems that the R2 free tier is "Available on Workers Paid plan" which is being replaced by the "Standard plan" [1]. I interpret this as saying that you can't get R2 literally for free. Looks like Cloudflare KV could work, with values that go up to a bit over 25MB. $5 per month is very reasonable if you're using it for real, though. [1] https://blog.cloudflare.com/workers-pricing-scale-to-zero/ https://blog.cloudflare.com/workers-pricing-scale-to-zero/
- jddj 3y agoWasabi should give you a lot more storage for almost the same price