News for hackers. Stuff that matters.
Re:Dribbble offline due to Postgres problem by mattryanharris on Wednesday May 15, 2013 @12:24AM (#5710161)
And if they don't?
Re:Dribbble offline due to Postgres problem by hijinks on Wednesday May 15, 2013 @12:32AM (#5710181)
then they have learned an important messages.. raid or replication isn't a backup
Re:Dribbble offline due to Postgres problem by hijinks on Wednesday May 15, 2013 @12:47AM (#5710219)
Replication and Raid isn't a backup because what if i do this in mysql

mysql> drop database production;

No way raid/replication will save you then. Same thing for some rogue delete statement gets in the code that deletes too much data.

Raid isn't a good backup because groups of drives are known to die at once or around the same time.

Re:Dribbble offline due to Postgres problem by wiredfool on Wednesday May 15, 2013 @01:42AM (#5710372)
You can't drop a database on postgres if anyone is connected to it, which is likely the case on production.
Re:Dribbble offline due to Postgres problem by Xylakant on Wednesday May 15, 2013 @02:34AM (#5710524)
TRUNCATE TABLE users; should work and will have similar disastrous effects.
Re:Dribbble offline due to Postgres problem by wiredfool on Wednesday May 15, 2013 @11:42AM (#5712713)
You can revoke truncate from public.
Re:Dribbble offline due to Postgres problem by Xylakant on Wednesday May 15, 2013 @01:19PM (#5713414)
Oh, sure. I'll just do "DELETE FROM users" and forget about the WHERE clause. Same effect.
Re:Dribbble offline due to Postgres problem by rbritton on Wednesday May 15, 2013 @12:46AM (#5710216)
It's not a backup because it will happily propagate data corruption through making all drives worthless. The only backup-like protection is provides is for sudden drive failure.
Re:Dribbble offline due to Postgres problem by wiredfool on Wednesday May 15, 2013 @01:42AM (#5710368)
Replication on Postgres can be the basis of a backup, IFF you store base base backups and WAL logs.

In normal life, your secondaries just chug along, consuming WAL logs.

Should you do something like drop/truncate a table, you can start with your base backup and replay the logs till just before your fat finger.

Re:Dribbble offline due to Postgres problem by k_bx on Wednesday May 15, 2013 @03:04AM (#5710604)
If it's disk failure -- then replication is best backup ever.
Re:Dribbble offline due to Postgres problem by mattspitz on Wednesday May 15, 2013 @12:42AM (#5710205)
Can you further explain why raid/replication isn't a backup? Sure, you can't backup beyond what you've replicated (locally or across a network), but for most folks, that should be fine.
Re:Dribbble offline due to Postgres problem by redler on Wednesday May 15, 2013 @01:25AM (#5710314)
Trolling, I assume? Just in case not: your own oh-shit moments (forgot that WHERE clause?), coding errors and oversights, bad luck, adversary SQL injection because the contractor who wrote some obscure admin page two years ago didn't know what he was doing, customer screw-ups (your web app customer fat-fingers their own critical data out of existence and begs you to roll them back to yesterday), etc.

If you have a real business you need a multi-generational backup scheme of some kind.

Re:Dribbble offline due to Postgres problem by joevandyk on Wednesday May 15, 2013 @01:19AM (#5710297)
What happens if you accidentally run "delete from orders"? Or drop the database? Or need to access data that was updated in place last week?
Re:Dribbble offline due to Postgres problem by sreitshamer on Wednesday May 15, 2013 @02:19AM (#5710479)
"Backup" means, more specifically, multiple backups at various points in time.
Re:Dribbble offline due to Postgres problem by bradleyland on Wednesday May 15, 2013 @10:26AM (#5712176)
RAID and replication are good for protecting against hardware failure, but hardware failure actually accounts for only a handful of the reasons you want a backup. RAID, replication, and backups are all solutions to problems. Once you look at the problems instead of the solutions, your answer becomes clear.

Often, the need for a backup arises from the need to go "back in time". RAID and replication offer no solution for this. Ok, so depending upon your replication setup, it may offer some help, but the steps required to go back in time usually involve starting from a recent backup, and using files involved in the replication to "replay" recent changes to get you back to the moment in the past you wish to return to.

Re:Dribbble offline due to Postgres problem by bifrost on Wednesday May 15, 2013 @04:06AM (#5710750)
You're kidding right? RAID is only good for dealing with HW failures, there are many more kinds of SW failure that can screw you and leave you with nothing, while having a perfectly good raid. Replication isn't a backup because if you screw up your dataset, well that screwup just got replicated.
Re:Dribbble offline due to Postgres problem by Zenst on Wednesday May 15, 2013 @11:31AM (#5712628)
indeed, may don't realise that, and a mistake/error replicated is still a mistake/error.

Still least I hope they didn't have transaction logging onto the same discs, seen that in horror because somebody had large raid array and did not think they needed the expense of another.

Re:Dribbble offline due to Postgres problem by samuelfine on Wednesday May 15, 2013 @12:33AM (#5710184)
We do. :)