Hacker News new | past | comments | ask | show | jobs | submit login

Naive question, but what is the advantage compared to a classical DB dump? Faster?



I think the keyword was "instantly."


Is it correct that then the original DB and the snapshotted DB share those blocks on the file system which are unmodified?

Assume 1 row per block: Original DB "A" has 2 rows, a snapshot "B" is created, "B" deletes one row and adds a new one.

Is it true that the row which "B" took over from "A" and left unmodified resides on the same block for "A" and "B", so that if the block gets corrupted, both databases will have to deal with that corrupt row?


Yes, that's one of the core parts of copy-on-write.

It shouldn't matter if you have a reasonable setup. If you depend on other files on the drive to continue working after blocks have started to go corrupt, that's not a good system.


Yes, faster. In my experience it took less a couple seconds at most for a copy of our production database, while a dump took several hours.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: