F
F
Forever7772018-07-10 12:20:48
PostgreSQL
Forever777, 2018-07-10 12:20:48

Transferring a postgres database without pg_dump?

Tell me who can come across.
How to transfer postgres base working directories to a new server with exactly the same hardware installed and postgres 9.4
version Unfortunately no backups The option to change
the /base directory does not work.
The option to create a database with the same name and replace the files with the old database does not work.
Backups unfortunately were made with an error.. therefore only postgres working directories
/base
/logs
Everything spins on Linux Centos
Thanks for any tip, even better solution, possibly on a paid basis. The issue needs to be resolved urgently.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
ky0, 2018-07-10
@ky0

If the DBMS versions and location are the same, moving the directory $PGDATAand all tablespaces should be sufficient. What's in the logs when you try to run?

M
Melkij, 2018-07-10
@melkij

The option to change the /base directory does not work.
The option to create a database with the same name and replace the files with the old database does not work.

And it won't work, of course.
Make a replica via pg_basebackup. When the master catches up, restart into a new master.
On a commercial basis - write to dataegret, the link is in my profile.

F
Forever777, 2018-07-10
@Forever777

Again. when trying to change /base /pg_log, xlog,clog, postgres does not start in the logs the following
In the logs:

LOG: database system was shut down at 2018-07-10 14:04:17 EEST
LOG: invalid primary checkpoint record
LOG: invalid secondary checkpoint record
PANIC: could not locate a valid checkpoint record
LOG: startup process (PID 3751) was terminated by signal 6: Aborted
LOG: aborting startup due to startup process failure

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question