jkells <jtkells@verizon.net> wrote:
> I tried to do a cold backup/copy
> cp -r * ../data2/
>
> and received the following from cp
> cp: base/9221176/9221183: I/O error
That sounds like your storage system is failing, quite independently
from PostgreSQL. Copy the entire data directory tree to some other
medium immediately, and preserve this copy. If you hit bad blocks,
retry if possible. If you just can't read some portions of it, you
need to get what you can, and make notes of any garbage or missed
portions of files. Use the copy as a source to copy onto a reliable
storage system.
Without knowing more about what sort of storage system you're
talking about it is hard to give advice or predict whether it might
be fixable somehow. If you try to run a database on failing
hardware, it will not be a pleasant experience.
-Kevin