this post was submitted on 18 Dec 2024
586 points (99.3% liked)
Programmer Humor
19817 readers
986 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Pro tip: Copying a Postgres database while live transactions are interacting with it frequently results in a corrupt backup.
Thankfully I test my Luanti backups.
Edit: I should clarify - My dangerous backup method was a naive file copy. I'm sure there's a different correct way to do a live backup. I just haven't checked into it yet, since stopping my Luanti server for a backup is no big deal.
Yikes! Thanks for the tip. I'm just starting to learn about Postgres. Think I'll stick with MySQL or SQLite for now... :o
Choosing to not use something is not a good way to learn how to use it.
In this particular instance, the lesson is to either a) use the provided database tools (e.g.
pg_dumpall
) for live backup, or b) bring the database cluster down before you backup the raw data folder.