Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
seungjin opened this issue Oct 12, 2023 · 4 comments
Open

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

seungjin opened this issue Oct 12, 2023 · 4 comments
Labels
feature request New feature request

Comments

@seungjin
Copy link

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
Copy link
Author

seungjin commented Oct 12, 2023

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 .

@macolso macolso added the feature request New feature request label Oct 12, 2023
@benwis
Copy link

benwis commented Mar 14, 2024

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

@ngryman
Copy link

ngryman commented Mar 25, 2024

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
Copy link
Member

bacongobbler commented Jul 22, 2024

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

No branches or pull requests

5 participants