fermyon / feedback

Centralized repository for Fermyon Cloud feedback and bug reports
3 stars 1 forks source link

Sqlite backup/restore or backup method - Fermyon Cloud #36

Open seungjin opened 1 year ago

seungjin commented 1 year ago

It's a feature request.

I would like to request periodic database backups or database snapshots. It doesn't have to be fully automated, such as recovering from backups through a fancy UI, but I would like a method that I can request through Fermyon, and for Fermyon to perform database backups and recovery for any incident, disaster, or even in the event of a global catastrophe like WWIII.

seungjin commented 1 year ago

Maybe spin command that can download my sqlite file?

No-ops-db means: "I am lazy. You do my ops for me" not there is no(body) to ops. :-)
So expecting some kind of snapshot or high availability .

benwis commented 8 months ago

Would love to see this, it makes recommending the inbuilt db very hard

ngryman commented 7 months ago

Fermyon uses Turso behind the scenes. It would be nice to expose their Point-in-Time Recovery feature.

As mentioned above, it's very hard to switch to your SQLite offering for a serious project without any kind of backup mechanism.

bacongobbler commented 3 months ago

Hi everyone!

You can execute SQL statements through the CLI using the spin cloud sqlite execute command. The developer documentation shows how to upload data from a .sql script:

spin cloud sqlite create my-database
spin cloud sqlite execute -d my-database @dump.sql

Note that the spin cloud sqlite execute command does not show any output, so it cannot be used to dump data from the database.

Having said that, because applications have access to the SQL database, it is possible to write a WebAssembly component that will dump your database to a file for you. @karthik2804 wrote a program a while back that provides a web CLI to a SQL database attached to the application. It is most likely out of date, but it could be used as inspiration. I would imagine cron trigger support would be very useful for periodic backups to external systems as well.

Out of curiosity, when y'all are asking for periodic backups, where would you expect that data to be stored? Would something like a point-in-time-recovery feature work for your use case, or do you need the ability to export all data to an external source?