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?


  • 3
    "I've found nothing relevant on the internet" - apparently you have not looked into the manual – a_horse_with_no_name Dec 16 '16 at 11:28
  • 3
    Oracle would be a pretty bad DBMS - especially for that price - if it didn't allow online backups. I don't think any commercial database requires to be stopped to take a backup. – a_horse_with_no_name Dec 16 '16 at 11:52
  • The old version did not allow it @a_horse_with_no_name... – Andy K Dec 16 '16 at 11:53
  • 3
    All versions of Oracle since (at least) 8.x allowed to take a logical backup (dump) while the database was running. And 8.x also allowed to take online physical backups (when running in archivelog mode) and physical online incremental backups using rman – a_horse_with_no_name Dec 16 '16 at 11:55

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.

  • Do you mean I can have a backup only if I want... – Andy K Dec 16 '16 at 11:55
  • My question would be : can I do a backup of the drive and have it reinstalled on any other drive and have postgres still running up to the latest version...? – Andy K Dec 16 '16 at 11:58
  • 1
    @AndyK: I don't understand your comment. A backup of the entire drive is something completely different then a database backup. And yes, you typically only do a backup if you want to – a_horse_with_no_name Dec 16 '16 at 12:01

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.