top | item 41767722

(no title)

peterpans01 | 1 year ago

"Database: SQLite with SQLx for type-safe queries"

I might be ignorance. But is it not safe? How do you back up your data?

discuss

order

lukaesch|1 year ago

Thanks for asking! Using SQLite with SQLx in Rust provides type-safe SQL queries, which enhances safety by catching errors at compile time.

As for backups, the setup is straightforward: just periodically copy the SQLite file to a secure location. Since it's a single binary and a database file, this keeps things simple and low-maintenance.

pornel|1 year ago

I hope you're calling the `backup` command in sqlite. A simple copy can leave sqlite db files in an inconsistent state from which sqlite can't recover.