Answer the question
In order to leave comments, you need to log in
How to restore pg from /var/lib/pgsql?
The operating system died, but with the help of a boot disk, I copied the database.
However, it turned out to be more difficult to restore them than I thought.
What I already did.
I replaced /var/lib/pgsql/9.4/data/base I
gave it rights chown -R postgres:postgres /var/lib/pgsql/9.4/data/base
psql starts up, does not see new databases (
Answer the question
In order to leave comments, you need to log in
you need to copy completely /var/lib/pgsql/9.4/data , and not just /var/lib/pgsql/9.4/data/base
if you put symlinks on /var/lib/pgsql/9.4/data/pg_xlog, then find and transfer content too
stop postgres
copy all directories from /var/lib/pgsql
give postgres rights to directories and files
run postgres
well, postgress you should have the same version, not so you copied 9.1 to 9.4
Although I was an atheist for the first time)))
When everything was bad)
It turns out it didn’t work because of access rights, I had 777, I set it to copy from a broken OS, but Postgres didn’t like it.
Put 700 and everything worked like clockwork.
The answer from the postgresql.ru.net/node/215461
forum helped
. But thank you very much.
I thought that all the holidays would have to work (
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question