←back to thread

221 points finnlab | 1 comments | | HN request time: 0.199s | source
Show context
hankchinaski ◴[] No.43545422[source]
The only thing that holds me back for self hosting is Postgres. Has anyone managed to get a rock solid Postgres setup self managed? Backups + tuning?
replies(8): >>43545468 #>>43545490 #>>43545510 #>>43545550 #>>43545777 #>>43545820 #>>43546275 #>>43547434 #
homebrewer ◴[] No.43545550[source]
Put it on a zfs dataset and back up data on the filesystem level (using sanoid/syncoid to manage snapshots, or any of their alternatives). It will be much more efficient compared to all other backup strategies with similar maintenance complexity.
replies(1): >>43545814 #
candiddevmike ◴[] No.43545814[source]
Filesystem backups may not be consistent and may lose transactions that haven't made it to the WAL. You should always try to use database backup tools like pgdump.
replies(4): >>43546121 #>>43546462 #>>43547389 #>>43551842 #
1. nijave ◴[] No.43547389[source]
If a filesystem backup isn't consistent, the app isn't using sync correctly and needs a bug report. No amount of magic can work around an app that wants to corrupt data.

For most apps, the answer is usually "use a database" that correctly saves data.