Skip to content

Problem with restore from backup created from replica. #616

@artemsafiyulin

Description

@artemsafiyulin

Hello! I have a problem with restore backups, witch was make from stand-by server. I have next configuration:

Master-replica based on patroni.

Backup server for creating and testing backups.

If i create backup from master, they restored correctly, but if i create backup from replica, when backup restored and i try start postgresql, i got next error:

2023-12-07 08:08:10 INFO: Starting postgresql
waiting for server to start....2023-12-07 08:08:11.079 GMT [148] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2023-12-07 08:08:11.103 GMT [148] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2023-12-07 08:08:11.122 GMT [148] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2023-12-07 08:08:11.205 GMT [149] LOG:  database system was interrupted; last known up at 2023-12-07 07:26:47 GMT
2023-12-07 08:08:11.205 GMT [149] LOG:  creating missing WAL directory "pg_wal/archive_status"
.2023-12-07 08:08:12.148 GMT [149] FATAL:  requested timeline 30 does not contain minimum recovery point 572E/FB416508 on timeline 0
2023-12-07 08:08:12.149 GMT [148] LOG:  startup process (PID 149) exited with exit code 1
2023-12-07 08:08:12.149 GMT [148] LOG:  aborting startup due to startup process failure
2023-12-07 08:08:12.162 GMT [148] LOG:  database system is shut down
 stopped waiting
pg_ctl: could not start server

Both postgresql servers has identical cofiguration:

postgres=# select version();
                                                 version                                                  
----------------------------------------------------------------------------------------------------------
 PostgreSQL 11.22 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit
(1 row)

postgres=# \q
-bash-4.2$ pg_probackup-11 --version
pg_probackup-11 2.5.12 (PostgreSQL 11.14)
-bash-4.2$ cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

-bash-4.2$

Can you please help me with this problem?

P.S. command for creating backup:

pg_probackup-11 backup -B /backup/my_instance-11 --instance=my_instance-11 -b FULL -j 4 --pghost=master_or_replica.domain.com --stream --archive-timeout=1200 --delete-wal --delete-expired

command for restoring backup:

pg_probackup-11 restore -B /backup/my_instance-11/ --instance=my_instance-11 -D /var/lib/pgsql/11/data -j 4 --remote-proto=none

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions