postgres-operator icon indicating copy to clipboard operation
postgres-operator copied to clipboard

pgo 5.2 cannot restore from s3

Open tirelibirefe opened this issue 3 years ago • 0 comments

Hello, I use pgo 5.2

I followed the recipe here which is the topic "Clone From Backups Stored in S3 / GCS / Azure Blob Storage".

My config is below:

spec:
  image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.5-1
  postgresVersion: 14
  customReplicationTLSSecret:
    name: ferahevler-repl-tls
  customTLSSecret:
    name: ferahevler-tls
  dataSource:
    postgresCluster:
      clusterName: ferahevler
      repoName: repo1
      options:
      - --set=20220915-141452F
      - --type=immediate
  instances:
    - name: pgha1
      replicas: 2
      dataVolumeClaimSpec:
        storageClassName: ebs-sc-enc
        accessModes:
        - "ReadWriteOnce"
        resources:
          requests:
            storage: 1Gi

I get the following error.

k logs -n psql-seyrantepe seyrantepe-pgbackrest-restore-75nxg
+ pgbackrest restore --stanza=db --pg1-path=/pgdata/pg14 --repo=1 --delta --link-map=pg_wal=/pgdata/pg14_wal
WARN: unable to open log file '/pgdata/pgbackrest/log/db-restore.log': No such file or directory
      NOTE: process will continue without log file.
2022-09-15 14:35:15.605 GMT [18] LOG:  starting PostgreSQL 14.5 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-10), 64-bit
2022-09-15 14:35:15.606 GMT [18] LOG:  listening on IPv6 address "::1", port 5432
2022-09-15 14:35:15.606 GMT [18] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2022-09-15 14:35:15.620 GMT [18] LOG:  listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-09-15 14:35:15.635 GMT [19] LOG:  database system was interrupted; last known up at 2022-09-15 14:16:33 GMT
2022-09-15 14:35:15.891 GMT [19] LOG:  restored log file "00000002.history" from archive
2022-09-15 14:35:16.009 GMT [19] LOG:  starting archive recovery
2022-09-15 14:35:16.095 GMT [19] LOG:  restored log file "00000002.history" from archive
2022-09-15 14:35:16.412 GMT [19] LOG:  restored log file "00000002000000000000000C" from archive
2022-09-15 14:35:16.505 GMT [19] LOG:  redo starts at 0/C000028
2022-09-15 14:35:16.630 GMT [19] LOG:  redo done at 0/C0000D8 system usage: CPU: user: 0.00 s, system: 0.00 s, elapsed: 0.12 s
2022-09-15 14:35:16.882 GMT [19] LOG:  restored log file "00000002000000000000000C" from archive
2022-09-15 14:35:16.924 GMT [19] FATAL:  WAL ends before end of online backup
2022-09-15 14:35:16.924 GMT [19] HINT:  All WAL generated while online backup was taken must be available at recovery.
2022-09-15 14:35:16.926 GMT [18] LOG:  startup process (PID 19) exited with exit code 1
2022-09-15 14:35:16.926 GMT [18] LOG:  terminating any other active server processes
2022-09-15 14:35:16.927 GMT [18] LOG:  shutting down due to startup process failure
2022-09-15 14:35:16.928 GMT [18] LOG:  database system is shut down
pg_ctl: could not start server
Examine the log output.

If there is anyone who can restore encryped backups from S3, could you please advise ?

Thanks & Regards

tirelibirefe avatar Sep 15 '22 14:09 tirelibirefe