Tuesday, October 28, 2014

One more time: Replication is no substitute for good backups.

I don't know how many times I have had to try to drum this into clients' heads. Having an up to date replica won't protect you against certain kinds of failures. If you really want to protect your data, you need to use a proper backup solution - preferable a continuous backup solution. The ones I prefer to use are barman and wal-e. Both have strengths and weaknesses, but both are incredibly useful, and fairly well documented and simple to set up. If you're not using one of them, or something similar, your data is at risk.

(In case you haven't guessed, today is another of those days when I'm called in to help someone where the master and the replica are corrupted and the last trusted pg_dump backup is four days old and rolling back to it would cost a world of pain. I like these jobs. They can stretch your ingenuity, and no two are exactly alike. But I'd still rather be paid for something more productive.)

1 comment:

  1. Thanks for posting this sentence - which unfortunately is not as obvious as it should be. It is something that myself and the rest of the Barman team has been trying to focus and promote for years - this is one of the main reasons that led us to develop Barman in the first place.

    I actually think that time delayed standby servers introduced in 9.4 are the only form of replication that can be considered part of a disaster recovery solution.

    Thank you,
    Gabriele

    ReplyDelete