postgres-operator
postgres-operator copied to clipboard
encyrpted db clone from s3 doesn't work
Hello, pgo 5.1 psql 14 eks 1.2
I followed the recipe here which is the topic "Clone From Backups Stored in S3 / GCS / Azure Blob Storage".
I had a psql cluster named "ferahevler" and its backups in S3.

I deleted "feraehevler" and I would like restore/clone it from S3 to a new psql cluster named "seyrantepe".
here is the config:
apiVersion: postgres-operator.crunchydata.com/v1beta1
kind: PostgresCluster
metadata:
name: seyrantepe
namespace: psql-seyrantepe
spec:
image: registry.developers.crunchydata.com/crunchydata/crunchy-postgres:ubi8-14.2-1
postgresVersion: 14
customReplicationTLSSecret:
name: seyrantepe-repl-tls
customTLSSecret:
name: seyrantepe-tls
dataSource:
pgbackrest:
stanza: db
configuration:
- secret:
name: psql-seyrantepe-s3-creds
- secret:
name: seyrantepe-pgbackrest-secrets
global:
repo1-path: /repo1/ferahevler
repo1-cipher-type: aes-256-cbc
repo:
name: repo1
s3:
bucket: ku-eksdev1-crunchydata-backups
endpoint: s3.eu-central-1.amazonaws.com:443
region: eu-central-1
users:
- name: postgres
- name: seyrantepe
databases:
- seyrantepe
...
When I run the new cluster installation, I get the following error message in restore pod:
$ k logs -n psql-seyrantepe seyrantepe-pgbackrest-restore-58g4w -f
Defaulted container "pgbackrest-restore" out of: pgbackrest-restore, nss-wrapper-init (init)
WARN: unable to open log file '/pgdata/pgbackrest/log/db-restore.log': No such file or directory
NOTE: process will continue without log file.
WARN: --delta or --force specified but unable to find 'PG_VERSION' or 'backup.manifest' in '/pgdata/pg14' to confirm that this is a valid $PGDATA directory. --delta and --force have been disabled and if any files exist in the destination directories the restore will be aborted.
2022-09-07 08:49:38.975 GMT [18] LOG: starting PostgreSQL 14.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-4), 64-bit
2022-09-07 08:49:38.976 GMT [18] LOG: listening on IPv6 address "::1", port 5432
2022-09-07 08:49:38.976 GMT [18] LOG: listening on IPv4 address "127.0.0.1", port 5432
2022-09-07 08:49:38.981 GMT [18] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432"
2022-09-07 08:49:38.986 GMT [19] LOG: database system was interrupted; last known up at 2022-09-07 08:19:21 GMT
2022-09-07 08:49:39.077 GMT [19] LOG: restored log file "00000002.history" from archive
2022-09-07 08:49:39.142 GMT [19] LOG: starting archive recovery
2022-09-07 08:49:39.226 GMT [19] LOG: restored log file "00000002.history" from archive
2022-09-07 08:49:39.442 GMT [19] LOG: restored log file "000000010000000000000015" from archive
2022-09-07 08:49:39.497 GMT [19] LOG: redo starts at 0/15000028
2022-09-07 08:49:39.652 GMT [19] LOG: restored log file "000000010000000000000016" from archive
2022-09-07 08:49:39.704 GMT [19] LOG: consistent recovery state reached at 0/16000088
2022-09-07 08:49:39.705 GMT [18] LOG: database system is ready to accept read-only connections
2022-09-07 08:49:39.889 GMT [19] LOG: restored log file "000000010000000000000017" from archive
2022-09-07 08:49:40.122 GMT [19] LOG: restored log file "000000010000000000000018" from archive
2022-09-07 08:49:40.346 GMT [19] LOG: restored log file "000000010000000000000019" from archive
2022-09-07 08:49:40.561 GMT [19] LOG: restored log file "00000001000000000000001A" from archive
2022-09-07 08:49:40.775 GMT [19] LOG: restored log file "00000001000000000000001B" from archive
2022-09-07 08:49:41.031 GMT [19] LOG: restored log file "00000001000000000000001C" from archive
2022-09-07 08:49:41.270 GMT [19] LOG: restored log file "00000002000000000000001D" from archive
2022-09-07 08:49:41.570 GMT [19] LOG: restored log file "00000002000000000000001E" from archive
2022-09-07 08:49:41.813 GMT [19] LOG: redo done at 0/1E142BD8 system usage: CPU: user: 0.00 s, system: 0.05 s, elapsed: 2.31 s
2022-09-07 08:49:41.813 GMT [19] LOG: last completed transaction was at log time 2022-09-07 08:47:09.187764+00
2022-09-07 08:49:42.042 GMT [19] LOG: restored log file "00000002000000000000001E" from archive
2022-09-07 08:49:42.187 GMT [19] LOG: selected new timeline ID: 3
2022-09-07 08:49:42.281 GMT [19] LOG: archive recovery complete
2022-09-07 08:49:42.356 GMT [19] LOG: restored log file "00000002.history" from archive
2022-09-07 08:49:42.410 GMT [18] LOG: database system is ready to accept connections
2022-09-07 08:49:42.414 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:42.414 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:43.419 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:43.419 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:43.883 GMT [18] LOG: received fast shutdown request
2022-09-07 08:49:43.886 GMT [18] LOG: aborting any active transactions
2022-09-07 08:49:43.889 GMT [18] LOG: background worker "logical replication launcher" (PID 55) exited with exit code 1
2022-09-07 08:49:43.890 GMT [24] LOG: shutting down
2022-09-07 08:49:43.982 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:43.982 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:43.982 GMT [54] WARNING: archiving write-ahead log file "00000003.history" failed too many times, will try again later
2022-09-07 08:49:43.985 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:43.985 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:44.989 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:44.989 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:45.996 GMT [54] LOG: archive command failed with exit code 1
2022-09-07 08:49:45.996 GMT [54] DETAIL: The failed archive command was: false
2022-09-07 08:49:45.997 GMT [54] WARNING: archiving write-ahead log file "00000003.history" failed too many times, will try again later
2022-09-07 08:49:46.003 GMT [18] LOG: database system is shut down
Restore cannot be completed successfully. Is there a workaround you can advise?
Thanks & Regards