Hacker News new | ask | show | jobs
by torginus 98 days ago
We've had this exact same issue (clean db for every test) - the way we solved it was with ZFS snapshots - just snapshot a directory of our data (databases, static assets, etc) - and the OS will automatically create a copy-on-write replica that can be written to, and the modification can be just thrown away (or preserved).

Once you've created a zfs snapshot, everything else is basically instant and costs very little perf.