質問

I've found nothing relevant on the internet about backing up postgres DB with raid1. So here's my question

My sys admin thinks that backing up the raid1 disk ,on which a Postgres database is sitting, is adequate as a Postgres backup. He would restored it when needed.

To my understanding, backup needs to have the database stopped, at least for some commercial database like Oracle.

Is it possible to backup the database without having it stopped with a raid1 scenario?

Thanks

役に立ちましたか?

解決

You can take a database dump using pg_dump (also know as "logical backup") or you can use pg_basebackup to make a file level backup.

Neither of those require stopping the database.

More details on both solutions can be found in the manual:


But taking the backup has nothing to do with the storage system that is used by the server. That could be a RAID or a single harddisk - that doesn't make any difference for the backup.

他のヒント

Tell your sys admin to search for "RAID is not a backup", whether it will provide a usable backup is irrelevant, since it doesn't protect you from database corruption, human error, and many other things.

Adding an additional answer (thanks Quora)

I believe RAID-1 only protect you from hardware failure.

It doesn’t protect you from logical failure, when your database get corrupted, it will mirror the corrupted data as well. so now you have two identical corrupted data.

There are a lot of backup application, and even replication, choose one that suits your needs.

And this one too

A backup is a versioned copy kept on a separate system, preferably in a different location.

Your RAID protects you from having to use a backup, a RAID 1 mirrors your content on two different disks to protect you from downtime when (when, not if) one disk goes bad.

The only thing your RAID exists for is to protect you from that one failure scenario.

RAID is not immune to logical errors caused by things like user error, malicious error (malware, hacking), application errors, filesystem errors, etc. Any corruption of data will immediately spread to both disks.

Your RAID does not protect you from hardware errors such as RAID card failures, server errors, etc.

It does not protect you from physical errors such as fire, earthquakes, water, power spikes, etc.

What you will want are periodic copies of your database that gets transferred to another media, on another server/system, in another location.

An easy (simplistic) rule for backups is the “3,2,1” rule:

  • Keep three copies of your data
  • Keep the copies on two different media
  • Keep at least one copy offsite

Right now you have two copies on one type of media in one site.

ライセンス: CC-BY-SA帰属
所属していません dba.stackexchange
scroll top