Comment

Comment by bambax

> If it takes a long time to copy a database and it gets updated midway through, rsync may give me an invalid database file. The first half of the file is pre-update, the second half file is post-update, and they don’t match. When I try to open the database locally, I get an error

Of course! You can't copy the file of a running, active db receiving updates, that can only result in corruption.

For replicating sqlite databases safely there is

https://github.com/benbjohnson/litestream

parent bambax 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton