News for hackers. Stuff that matters.
Re:A faster way to copy SQLite databases between computers by pixl97 on Thursday May 01, 2025 @09:55AM (#43857711)
>You can't copy the file of a running, active db receiving updates, that can only result in corruption

There is a slight 'well akshully' on this. A DB flush and FS snapshot where you copy the snapshotted file will allow this. MSSQL VSS snapshots would be an example of this.

Re:A faster way to copy SQLite databases between computers by tpmoney on Thursday May 01, 2025 @10:06AM (#43857853)
Similarly you can rsync a Postgres data directory safely while the db is running, with the caveat that you likely lose any data written while the rsync is running. And if you want that data, you can get it with the WAL files.

It’s been years since I needed to do this, but if I remember right, you can clone an entire pg db live with a `pg_backup_start()`, rsync the data directory, pg_backup_stop() and rsync the WAL files written since backup start.

Re:A faster way to copy SQLite databases between computers by edoceo on Thursday May 01, 2025 @11:07AM (#43858675)
For moving DBs where I'm allowed minutes of downtime I do rsync (slow) first from the live, while hot, then just stop that one, then rsync again (fast) then make the new one hot.

Works a treat when other (better) method are not available.

Re:A faster way to copy SQLite databases between computers by bob1029 on Thursday May 01, 2025 @07:12PM (#43864404)
MSSQL also offers a virtual backup device interface that 3rd party tools can implement.

https://learn.microsoft.com/en-us/sql/relational-databases/b...