3 ms·
File system snapshots of databases are not necessarily consistent, and can not always be restored like that.
by orf 9y ago
File system snapshots of databases are not necessarily consistent, and can not always be restored like that.
- floatboth 9y agoAtomic snapshots like ZFS's are always consistent for Postgres. I guess other databases with a similar write-ahead log can be snapshotted as well?
- anarazel 9y ago> Atomic snapshots like ZFS's are always consistent for Postgres. As long as you make sure to only use one filesystem, i.e. you don't place pg_xlog or some tablespaces on a different filesystem. You can get very weird corruption in such cases :)
- olavgg 9y agoWith ZFS you can also do atomic snapshots of multiple filesystems. https://serverfault.com/questions/608223/is-zfs-snapshot-r-of-several-pools-atomic https://serverfault.com/questions/608223/is-zfs-snapshot-r-o...
- jerry40 9y agoInteresting. I played with ZFS years ago on opensolaris, I don't remember there were atomic snapshots. I definitely need to dive into ZFS again.
- jerry40 9y agoBut if we "stop" this database/schema, make ZFS snapshot (I suggest that the "partition" keeps only this database related files) it may work. It can be useful for testing purposes I guess.