benbjohnson/litestream ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go tool that protects a SQLite database by running in the background and copying changes over as they happen, so I can recover the database if the original is lost or damaged. It should watch a local SQLite file safely through SQLite itself, keep track of updates incrementally, and send backups to either another file location or S3. I also want a restore command so I can bring the database back from a replica or backup when needed.

Make it simple to run, with a clear command line, good defaults, and helpful logs. It should handle the SQLite write ahead log correctly, avoid corrupting the database, and be careful about checkpoints and recovery. If there are docs or current examples online that would help, look them up and follow the usual setup people expect for a tool like this.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab