SurrealDB
-
I looked into this today. The file backend of surrealdb uses RocksDB - https://github.com/surrealdb/surrealdb/blob/bf702b0d67c63884dfa7fa567482858ce87315a5/lib/src/api/engine/any/mod.rs#L274C60-L274C67 . From what I have read, it is not safe to backups rocksdb by just using file copy . See https://github.com/surrealdb/surrealdb/issues/1681 and https://github.com/facebook/rocksdb/wiki/How-to-backup-RocksDB . This makes sense since it's a database .
I think we have to implement backup/restore flow into Cloudron to publish databases. This is why we also don't have PostgreSQL, MySQL, MongoDB etc as "apps" . Currently, there is no provision to backup and restore them when they are deployed as apps.
A separate issue is that this app has no real frontend . The app just redirects to surrealdb.com when clicked.
-
Thank you for looking into this @girish
I have some questions/notes:
- PocketBase is also a database. How is that you can support it and can't for other database?
- Note that SurrealDB can run on SurrealKV, a custom-tailored KV store. I will try to make it work with backups if that's possible.
- Yes, the main route is currently a redirect to the home page of the project website. We are currently working on embedding a web UI inside the db. So, this issue will be solved soon.
Will get back to you once everything is settled.
-
PocketBase is also a database. How is that you can support it and can't for other database?
I was under the mistaken impression that PocketBase uses postgres. But looking closer, it uses sqlite and afaik, it's not safe to copy sqlite3 file when there are pending writes. So, you are correct, that app is not safe either. Luckily, that app is still in unstable, we might have to delist that one. Or alternately, look into who we can add some hook to make consistent backups.
Yes, the main route is currently a redirect to the home page of the project website. We are currently working on embedding a web UI inside the db. So, this issue will be solved soon.
This will be great. TBH, We are open to publishing the app as-is as unstable with a warning. But the lack of a UI makes it strange. Like user installs an app and when they click, it just goes straight to some other website. It doesn't work well given the workflow of other apps on Cloudron. Is this the same as https://surrealdb.com/docs/surrealist or something else?
-
Or alternately, look into who we can add some hook to make consistent backups.
SurrealDB has an export mode. You can use either a
/export
endpoint or the command in cli. I like your idea of offering an option to customize the backup workflow.Is this the same as https://surrealdb.com/docs/surrealist or something else?
This is exactly what we'll try to embed, yes.